1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-07 07:45:35 +00:00

Make a copy of map key to work around it being invalidated (Fixes #3329)

This commit is contained in:
scrawl 2016-06-13 02:06:44 +02:00
parent 197e81206a
commit 3ec4ee6290

View file

@ -997,7 +997,8 @@ namespace MWMechanics
if (!iter->first.getClass().getCreatureStats(iter->first).isDead()) if (!iter->first.getClass().getCreatureStats(iter->first).isDead())
{ {
updateActor(iter->first, duration); MWWorld::Ptr actor = iter->first; // make a copy of the map key to avoid it being invalidated when the player teleports
updateActor(actor, duration);
if (MWBase::Environment::get().getWorld()->hasCellChanged()) if (MWBase::Environment::get().getWorld()->hasCellChanged())
{ {
return; // for now abort update of the old cell when cell changes by teleportation magic effect return; // for now abort update of the old cell when cell changes by teleportation magic effect