diff options
| author | megamage <none@none> | 2008-12-07 09:21:12 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-12-07 09:21:12 -0600 |
| commit | 087f735251a248217627a362f122b671a618729c (patch) | |
| tree | ed536d747a0d3df828d748af3bdeb231a2fc5d16 /src/game/GridNotifiersImpl.h | |
| parent | f593c806cb3b20881c5769cc7bcee747384b7c64 (diff) | |
*Use react state instead of isaggressive. Allow civilian to fight back.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
| -rw-r--r-- | src/game/GridNotifiersImpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index a4ad5a51bf7..970df635f50 100644 --- a/src/game/GridNotifiersImpl.h +++ b/src/game/GridNotifiersImpl.h @@ -72,7 +72,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c) pl->UpdateVisibilityOf(c); // Creature AI reaction - if(c->isAggressive() && !c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) + if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { if( c->AI() && c->IsWithinSightDist(pl) /*c->AI()->IsVisible(pl)*/ && !c->IsInEvadeMode() ) c->AI()->MoveInLineOfSight(pl); @@ -81,13 +81,13 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c) inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2) { - if(c1->isAggressive() && !c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) + if(c1->HasReactState(REACT_AGGRESSIVE) && !c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { if( c1->AI() && c1->IsWithinSightDist(c2) /*c1->AI()->IsVisible(c2)*/ && !c1->IsInEvadeMode() ) c1->AI()->MoveInLineOfSight(c2); } - if(c2->isAggressive() && !c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) + if(c2->HasReactState(REACT_AGGRESSIVE) && !c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { if( c2->AI() && c1->IsWithinSightDist(c2) /*c2->AI()->IsVisible(c1)*/ && !c2->IsInEvadeMode() ) c2->AI()->MoveInLineOfSight(c1); |
