forked from mirror/openmw-tes3mp
Stop AiPursue when target has invisibility or chameleon>=75
This commit is contained in:
parent
e5de253169
commit
019cd96719
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, AiState& state, float duratio
|
||||||
)
|
)
|
||||||
return true; //Target doesn't exist
|
return true; //Target doesn't exist
|
||||||
|
|
||||||
|
if (target.getClass().getCreatureStats(target).getMagicEffects().get(ESM::MagicEffect::Invisibility).getMagnitude() > 0
|
||||||
|
|| target.getClass().getCreatureStats(target).getMagicEffects().get(ESM::MagicEffect::Chameleon).getMagnitude() > 75)
|
||||||
|
return true;
|
||||||
|
|
||||||
if(target.getClass().getCreatureStats(target).isDead())
|
if(target.getClass().getCreatureStats(target).isDead())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue