mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-17 21:13:09 +00:00
Make sure adjustPosition() is safe to call for any actor
This commit is contained in:
parent
c8d85dcf30
commit
201999c4a9
1 changed files with 5 additions and 1 deletions
|
|
@ -1345,7 +1345,11 @@ namespace MWWorld
|
||||||
|
|
||||||
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
|
moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z());
|
||||||
if (ptr.getClass().isActor())
|
if (ptr.getClass().isActor())
|
||||||
mPhysics->getActor(ptr)->resetPosition();
|
{
|
||||||
|
MWPhysics::Actor* actor = mPhysics->getActor(ptr);
|
||||||
|
if (actor)
|
||||||
|
actor->resetPosition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::fixPosition()
|
void World::fixPosition()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue