1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Make sure adjustPosition() is safe to call for any actor

This commit is contained in:
Alexei Dobrohotov 2020-12-14 03:01:26 +03:00
parent c8d85dcf30
commit 201999c4a9

View File

@ -1345,7 +1345,11 @@ namespace MWWorld
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
if (ptr.getClass().isActor())
mPhysics->getActor(ptr)->resetPosition();
{
MWPhysics::Actor* actor = mPhysics->getActor(ptr);
if (actor)
actor->resetPosition();
}
}
void World::fixPosition()