mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 19:21:04 +00:00
Merge branch 'destination_nullptr' into 'master'
Make sure adjustPosition() is safe to call for any actor Closes #5742 See merge request OpenMW/openmw!464
This commit is contained in:
commit
2373f07168
@ -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…
x
Reference in New Issue
Block a user