1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Update scaled agent half extents in navigator (bug #4763)

This commit is contained in:
elsid 2019-03-03 15:14:51 +03:00
parent 43b39e8418
commit 2e063d59ce
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -1328,9 +1328,15 @@ namespace MWWorld
void World::scaleObject (const Ptr& ptr, float scale) void World::scaleObject (const Ptr& ptr, float scale)
{ {
if (mPhysics->getActor(ptr))
mNavigator->removeAgent(getPathfindingHalfExtents(ptr));
ptr.getCellRef().setScale(scale); ptr.getCellRef().setScale(scale);
mWorldScene->updateObjectScale(ptr); mWorldScene->updateObjectScale(ptr);
if (mPhysics->getActor(ptr))
mNavigator->addAgent(getPathfindingHalfExtents(ptr));
} }
void World::rotateObjectImp (const Ptr& ptr, const osg::Vec3f& rot, bool adjust) void World::rotateObjectImp (const Ptr& ptr, const osg::Vec3f& rot, bool adjust)