Handle mCellId in AiEscort

openmw-38
scrawl 9 years ago
parent b320a01cee
commit 4e678ce6b3

@ -1,12 +1,14 @@
#include "aiescort.hpp"
#include <components/esm/aisequence.hpp>
#include <components/esm/loadcell.hpp>
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/mechanicsmanager.hpp"
#include "../mwworld/class.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwmechanics/creaturestats.hpp"
@ -73,6 +75,9 @@ namespace MWMechanics
return true;
}
if (!mCellId.empty() && mCellId != actor.getCell()->getCell()->getCellId().mWorldspace)
return false; // Not in the correct cell, pause and rely on the player to go back through a teleport door
actor.getClass().getCreatureStats(actor).setDrawState(DrawState_Nothing);
actor.getClass().getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, false);

Loading…
Cancel
Save