mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 08:09:46 +00:00
Navigator doesn't use RefId anymore
This commit is contained in:
parent
150e2ba885
commit
63e44eddc9
5 changed files with 4 additions and 14 deletions
|
@ -541,7 +541,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
mNavigator.setWorldspace(
|
mNavigator.setWorldspace(
|
||||||
ESM::RefId::stringRefId(
|
Misc::StringUtils::lowerCase(
|
||||||
mWorld.getWorldModel().getExterior(playerCellX, playerCellY)->getCell()->mCellId.mWorldspace),
|
mWorld.getWorldModel().getExterior(playerCellX, playerCellY)->getCell()->mCellId.mWorldspace),
|
||||||
navigatorUpdateGuard.get());
|
navigatorUpdateGuard.get());
|
||||||
mNavigator.updateBounds(pos, navigatorUpdateGuard.get());
|
mNavigator.updateBounds(pos, navigatorUpdateGuard.get());
|
||||||
|
@ -665,7 +665,7 @@ namespace MWWorld
|
||||||
|
|
||||||
CellStore* cell = mWorld.getWorldModel().getExterior(it->mData.mX, it->mData.mY);
|
CellStore* cell = mWorld.getWorldModel().getExterior(it->mData.mX, it->mData.mY);
|
||||||
mNavigator.setWorldspace(
|
mNavigator.setWorldspace(
|
||||||
ESM::RefId::stringRefId(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
Misc::StringUtils::lowerCase(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
||||||
const osg::Vec3f position
|
const osg::Vec3f position
|
||||||
= osg::Vec3f(it->mData.mX + 0.5f, it->mData.mY + 0.5f, 0) * Constants::CellSizeInUnits;
|
= osg::Vec3f(it->mData.mX + 0.5f, it->mData.mY + 0.5f, 0) * Constants::CellSizeInUnits;
|
||||||
mNavigator.updateBounds(position, navigatorUpdateGuard.get());
|
mNavigator.updateBounds(position, navigatorUpdateGuard.get());
|
||||||
|
@ -723,7 +723,7 @@ namespace MWWorld
|
||||||
|
|
||||||
CellStore* cell = mWorld.getWorldModel().getInterior(it->mName);
|
CellStore* cell = mWorld.getWorldModel().getInterior(it->mName);
|
||||||
mNavigator.setWorldspace(
|
mNavigator.setWorldspace(
|
||||||
ESM::RefId::stringRefId(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
Misc::StringUtils::lowerCase(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
||||||
ESM::Position position;
|
ESM::Position position;
|
||||||
mWorld.findInteriorPosition(it->mName, position);
|
mWorld.findInteriorPosition(it->mName, position);
|
||||||
mNavigator.updateBounds(position.asVec3(), navigatorUpdateGuard.get());
|
mNavigator.updateBounds(position.asVec3(), navigatorUpdateGuard.get());
|
||||||
|
@ -880,7 +880,7 @@ namespace MWWorld
|
||||||
loadingListener->setProgressRange(cell->count());
|
loadingListener->setProgressRange(cell->count());
|
||||||
|
|
||||||
mNavigator.setWorldspace(
|
mNavigator.setWorldspace(
|
||||||
ESM::RefId::stringRefId(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
Misc::StringUtils::lowerCase(cell->getCell()->mCellId.mWorldspace), navigatorUpdateGuard.get());
|
||||||
mNavigator.updateBounds(position.asVec3(), navigatorUpdateGuard.get());
|
mNavigator.updateBounds(position.asVec3(), navigatorUpdateGuard.get());
|
||||||
|
|
||||||
// Load cell.
|
// Load cell.
|
||||||
|
|
|
@ -93,8 +93,6 @@ namespace DetourNavigator
|
||||||
*/
|
*/
|
||||||
virtual void setWorldspace(std::string_view worldspace, const UpdateGuard* guard) = 0;
|
virtual void setWorldspace(std::string_view worldspace, const UpdateGuard* guard) = 0;
|
||||||
|
|
||||||
virtual void setWorldspace(const ESM::RefId& worldspace, const UpdateGuard* guard) = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief updateBounds should be called before adding object from loading cell
|
* @brief updateBounds should be called before adding object from loading cell
|
||||||
* @param playerPosition corresponds to the bounds center
|
* @param playerPosition corresponds to the bounds center
|
||||||
|
|
|
@ -39,11 +39,6 @@ namespace DetourNavigator
|
||||||
mNavMeshManager.setWorldspace(worldspace, getImpl(guard));
|
mNavMeshManager.setWorldspace(worldspace, getImpl(guard));
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigatorImpl::setWorldspace(const ESM::RefId& worldspace, const UpdateGuard* guard)
|
|
||||||
{
|
|
||||||
setWorldspace(Misc::StringUtils::lowerCase(worldspace.getRefIdString()), guard);
|
|
||||||
}
|
|
||||||
|
|
||||||
void NavigatorImpl::updateBounds(const osg::Vec3f& playerPosition, const UpdateGuard* guard)
|
void NavigatorImpl::updateBounds(const osg::Vec3f& playerPosition, const UpdateGuard* guard)
|
||||||
{
|
{
|
||||||
mNavMeshManager.updateBounds(playerPosition, getImpl(guard));
|
mNavMeshManager.updateBounds(playerPosition, getImpl(guard));
|
||||||
|
|
|
@ -29,8 +29,6 @@ namespace DetourNavigator
|
||||||
|
|
||||||
void setWorldspace(std::string_view worldspace, const UpdateGuard* guard) override;
|
void setWorldspace(std::string_view worldspace, const UpdateGuard* guard) override;
|
||||||
|
|
||||||
void setWorldspace(const ESM::RefId& worldspace, const UpdateGuard* guard) override;
|
|
||||||
|
|
||||||
void updateBounds(const osg::Vec3f& playerPosition, const UpdateGuard* guard) override;
|
void updateBounds(const osg::Vec3f& playerPosition, const UpdateGuard* guard) override;
|
||||||
|
|
||||||
void addObject(const ObjectId id, const ObjectShapes& shapes, const btTransform& transform,
|
void addObject(const ObjectId id, const ObjectShapes& shapes, const btTransform& transform,
|
||||||
|
|
|
@ -24,7 +24,6 @@ namespace DetourNavigator
|
||||||
void removeAgent(const AgentBounds& /*agentBounds*/) override {}
|
void removeAgent(const AgentBounds& /*agentBounds*/) override {}
|
||||||
|
|
||||||
void setWorldspace(std::string_view /*worldspace*/, const UpdateGuard* /*guard*/) override {}
|
void setWorldspace(std::string_view /*worldspace*/, const UpdateGuard* /*guard*/) override {}
|
||||||
void setWorldspace(const ESM::RefId& /*worldspace*/, const UpdateGuard* /*guard*/) override {}
|
|
||||||
|
|
||||||
void addObject(const ObjectId /*id*/, const ObjectShapes& /*shapes*/, const btTransform& /*transform*/,
|
void addObject(const ObjectId /*id*/, const ObjectShapes& /*shapes*/, const btTransform& /*transform*/,
|
||||||
const UpdateGuard* /*guard*/) override
|
const UpdateGuard* /*guard*/) override
|
||||||
|
|
Loading…
Reference in a new issue