*Do not allow creature to enterevademode when it is on vehicle.

*Do not allow unit to attack its vehicle.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-22 21:10:15 -05:00
parent b524ef4abe
commit 336fd3f4ed

View File

@@ -10524,6 +10524,9 @@ bool Unit::canAttack(Unit const* target, bool force) const
if(target->GetVisibility() == VISIBILITY_GROUP_STEALTH && !canDetectStealthOf(target, GetDistance(target)))
return false;
if(target == m_Vehicle)
return false;
return true;
}
@@ -11247,6 +11250,9 @@ Unit* Creature::SelectVictim()
return NULL;
}
if(m_Vehicle)
return NULL;
// search nearby enemy before enter evade mode
if(HasReactState(REACT_AGGRESSIVE))
if(target = SelectNearestTarget())