From 454d1ffaef38b28f23b45ffbe45171549d097583 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 13 Oct 2016 14:39:58 +0200 Subject: [PATCH] Make the cell change check during actor update more robust --- apps/openmw/mwmechanics/actors.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 2a313df153..1a6a62fc3b 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1035,8 +1035,9 @@ namespace MWMechanics if (!iter->first.getClass().getCreatureStats(iter->first).isDead()) { MWWorld::Ptr actor = iter->first; // make a copy of the map key to avoid it being invalidated when the player teleports + bool cellChanged = MWBase::Environment::get().getWorld()->hasCellChanged(); updateActor(actor, duration); - if (MWBase::Environment::get().getWorld()->hasCellChanged()) + if (!cellChanged && MWBase::Environment::get().getWorld()->hasCellChanged()) { return; // for now abort update of the old cell when cell changes by teleportation magic effect // a better solution might be to apply cell changes at the end of the frame