*Disable charmed/possessed creature AI.
*Use general react states to replace charminfo react states. --HG-- branch : trunk
This commit is contained in:
@@ -74,7 +74,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
||||
// Creature AI reaction
|
||||
if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_SIGHTLESS))
|
||||
{
|
||||
if( c->AI() && c->IsWithinSightDist(pl) && !c->IsInEvadeMode() )
|
||||
if( c->IsAIEnabled && c->IsWithinSightDist(pl) && !c->IsInEvadeMode() )
|
||||
c->AI()->MoveInLineOfSight(pl);
|
||||
}
|
||||
}
|
||||
@@ -83,13 +83,13 @@ inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
|
||||
{
|
||||
if(c1->HasReactState(REACT_AGGRESSIVE) && !c1->hasUnitState(UNIT_STAT_SIGHTLESS))
|
||||
{
|
||||
if( c1->AI() && c1->IsWithinSightDist(c2) && !c1->IsInEvadeMode() )
|
||||
if( c1->IsAIEnabled && c1->IsWithinSightDist(c2) && !c1->IsInEvadeMode() )
|
||||
c1->AI()->MoveInLineOfSight(c2);
|
||||
}
|
||||
|
||||
if(c2->HasReactState(REACT_AGGRESSIVE) && !c2->hasUnitState(UNIT_STAT_SIGHTLESS))
|
||||
{
|
||||
if( c2->AI() && c1->IsWithinSightDist(c2) && !c2->IsInEvadeMode() )
|
||||
if( c2->IsAIEnabled && c1->IsWithinSightDist(c2) && !c2->IsInEvadeMode() )
|
||||
c2->AI()->MoveInLineOfSight(c1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user