[7745] Fixed gcc warnings.

This commit is contained in:
AlexDereka 2009-05-02 23:08:43 +04:00
parent 8d3585f5ee
commit 27fabf7ace
24 changed files with 145 additions and 128 deletions

View file

@ -318,8 +318,9 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
break;
}
if( currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE) )
if ((currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat()) &&
pAttacker->IsWithinDistInMap(target, ATTACK_DISTANCE))
{ //implement 110% threat rule for targets in melee range
found = true; //and 130% rule for targets in ranged distances
break; //for selecting alive targets