aboutsummaryrefslogtreecommitdiff
path: root/src/game/ThreatManager.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 22:21:46 -0500
committermegamage <none@none>2009-05-03 22:21:46 -0500
commit1cfc04f1f59b0a3d8c75b901554cd05ec90158ce (patch)
tree3e74e030fd9c21b94d9e60c16629b0264b36d9d2 /src/game/ThreatManager.cpp
parent5f167c56ef03ae7dfe69f3bd927612bf3cfa4991 (diff)
[7745] Fixed gcc warnings. Author: AlexDereka
--HG-- branch : trunk
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r--src/game/ThreatManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index ab989ad9598..55fcf51c5b0 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -320,8 +320,9 @@ HostilReference* ThreatContainer::selectNextVictim(Creature* pAttacker, HostilRe
break;
}
- if( currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
- currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat() && pAttacker->IsWithinMeleeRange(target) )
+ if ((currentRef->getThreat() > 1.3f * pCurrentVictim->getThreat() ||
+ currentRef->getThreat() > 1.1f * pCurrentVictim->getThreat()) &&
+ pAttacker->IsWithinMeleeRange(target))
{ //implement 110% threat rule for targets in melee range
found = true; //and 130% rule for targets in ranged distances
break; //for selecting alive targets