Remove redundant Scene::updatePosition function

make_linux_ci_do_zoomies
elsid 2 years ago
parent aeb4611d6c
commit feb645d15f
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -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…
Cancel
Save