mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 06:45:35 +00:00
Don't crash the game when placing a non-actor
This commit is contained in:
parent
fd64aacf7d
commit
39ac0cbb4a
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 (force) // force physics to use the new position
|
if (force) // force physics to use the new position
|
||||||
mPhysics->getActor(ptr)->resetPosition();
|
{
|
||||||
|
auto actor = mPhysics->getActor(ptr);
|
||||||
|
if(actor)
|
||||||
|
actor->resetPosition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::fixPosition()
|
void World::fixPosition()
|
||||||
|
|
Loading…
Reference in a new issue