forked from teamnwah/openmw-tes3coop
Handle mCellId in AiEscort
This commit is contained in:
parent
b320a01cee
commit
4e678ce6b3
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue