mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 17:39:42 +00:00
Remove redundant Scene::updatePosition function
This commit is contained in:
parent
aeb4611d6c
commit
feb645d15f
3 changed files with 3 additions and 12 deletions
|
@ -286,15 +286,6 @@ namespace MWWorld
|
|||
}
|
||||
}
|
||||
|
||||
void Scene::updateObjectPosition(const Ptr &ptr, const osg::Vec3f &pos, bool movePhysics)
|
||||
{
|
||||
mRendering.moveObject(ptr, pos);
|
||||
if (movePhysics)
|
||||
{
|
||||
mPhysics->updatePosition(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Scene::updateObjectRotation(const Ptr &ptr, RotationOrder order)
|
||||
{
|
||||
const auto rot = makeNodeRotation(ptr, order);
|
||||
|
|
|
@ -188,7 +188,6 @@ namespace MWWorld
|
|||
|
||||
void updateObjectRotation(const Ptr& ptr, RotationOrder order);
|
||||
void updateObjectScale(const Ptr& ptr);
|
||||
void updateObjectPosition(const Ptr &ptr, const osg::Vec3f &pos, bool movePhysics);
|
||||
|
||||
bool isCellActive(const CellStore &cell);
|
||||
|
||||
|
|
|
@ -1260,10 +1260,11 @@ namespace MWWorld
|
|||
}
|
||||
if (haveToMove && newPtr.getRefData().getBaseNode())
|
||||
{
|
||||
mWorldScene->updateObjectPosition(newPtr, position, movePhysics);
|
||||
mRendering->moveObject(newPtr, position);
|
||||
if (movePhysics)
|
||||
{
|
||||
if (const auto object = mPhysics->getObject(ptr))
|
||||
mPhysics->updatePosition(newPtr);
|
||||
if (const MWPhysics::Object* object = mPhysics->getObject(newPtr))
|
||||
updateNavigatorObject(*object);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue