Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead

This commit is contained in:
Arthur Ice 2015-01-18 01:27:47 -08:00
parent 3ed365cd43
commit 121328b188

View File

@ -3354,7 +3354,7 @@ void Bot::AI_Process() {
if(GetHasBeenSummoned()) { if(GetHasBeenSummoned()) {
if(IsBotCaster() || IsBotArcher()) { if(IsBotCaster() || IsBotArcher()) {
if (AImovement_timer->Check()) { if (AImovement_timer->Check()) {
if(!GetTarget() || (IsBotCaster() && !IsBotCasterCombatRange(GetTarget())) || (IsBotArcher() && IsArcheryRange(GetTarget())) || (DistNoRootNoZ(m_PreSummonLocation.m_X, m_PreSummonLocation.m_Y) < 10)) { if(!GetTarget() || (IsBotCaster() && !IsBotCasterCombatRange(GetTarget())) || (IsBotArcher() && IsArcheryRange(GetTarget())) || (ComparativeDistanceNoZ(static_cast<xyz_location>(m_Position), m_PreSummonLocation) < 10)) {
if(GetTarget()) if(GetTarget())
FaceTarget(GetTarget()); FaceTarget(GetTarget());
SetHasBeenSummoned(false); SetHasBeenSummoned(false);