hedgewars/uAIMisc.pas
changeset 5881 099464aab4b6
parent 5645 b434ba5d064e
child 6011 519f8a58c021
--- a/hedgewars/uAIMisc.pas	Mon Sep 12 23:08:24 2011 +0400
+++ b/hedgewars/uAIMisc.pas	Mon Sep 12 16:38:54 2011 -0400
@@ -112,7 +112,7 @@
             end;
 
 if e > f then friendlyfactor:= 300 + (e - f) * 30
-else friendlyfactor:= max(30, 300 - f * 80 div e)
+else friendlyfactor:= max(30, 300 - f * 80 div max(1,e))
 end;
 
 procedure FillBonuses(isAfterAttack: boolean; filter: TGearsType);