mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Handle mCellId in AiEscort
This commit is contained in:
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…
x
Reference in New Issue
Block a user