aboutsummaryrefslogtreecommitdiff
path: root/src/game/GridNotifiersImpl.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-23 14:16:03 -0500
committermegamage <none@none>2009-08-23 14:16:03 -0500
commit4a85a779c1c3fc26b0b7a61115fc2e5b47d1840f (patch)
treee64921d83ef3c485c3634ad437237ec94d113fc4 /src/game/GridNotifiersImpl.h
parentce0a3afc1997e45e12342071db0029fcc3716118 (diff)
*Allow to change creature's sight distance because 50 yards are too small for some scripts.
--HG-- branch : trunk
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r--src/game/GridNotifiersImpl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 211bca9cd3c..f2970805eab 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -45,7 +45,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
// Creature AI reaction
if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_SIGHTLESS))
{
- if( c->IsAIEnabled && c->IsWithinSightDist(pl) && !c->IsInEvadeMode() )
+ if( c->IsAIEnabled && c->_IsWithinDist(pl, c->m_SightDistance, true) && !c->IsInEvadeMode() )
c->AI()->MoveInLineOfSight(pl);
}
}
@@ -54,13 +54,13 @@ inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
{
if(c1->HasReactState(REACT_AGGRESSIVE) && !c1->hasUnitState(UNIT_STAT_SIGHTLESS))
{
- if( c1->IsAIEnabled && c1->IsWithinSightDist(c2) && !c1->IsInEvadeMode() )
+ if( c1->IsAIEnabled && c1->_IsWithinDist(c2, c1->m_SightDistance, true) && !c1->IsInEvadeMode() )
c1->AI()->MoveInLineOfSight(c2);
}
if(c2->HasReactState(REACT_AGGRESSIVE) && !c2->hasUnitState(UNIT_STAT_SIGHTLESS))
{
- if( c2->IsAIEnabled && c1->IsWithinSightDist(c2) && !c2->IsInEvadeMode() )
+ if( c2->IsAIEnabled && c1->_IsWithinDist(c2, c2->m_SightDistance, true) && !c2->IsInEvadeMode() )
c2->AI()->MoveInLineOfSight(c1);
}
}