Merge branch 'placeatmecrash' into 'master'

Don't crash the game when placing a non-actor

See merge request OpenMW/openmw!443
pull/593/head
psi29a 4 years ago
commit afaacedf67

@ -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…
Cancel
Save