Computer hog no longer walks into player-placed mines if >= 90% duds
authorWuzzy <Wuzzy2@mail.ru>
Mon, 08 Apr 2019 02:22:51 +0200
changeset 14785 b3fa6a19fc25
parent 14784 4deba377799e
child 14786 ba8dd081359d
Computer hog no longer walks into player-placed mines if >= 90% duds
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Mon Apr 08 00:59:08 2019 +0200
+++ b/hedgewars/uAIMisc.pas	Mon Apr 08 02:22:51 2019 +0200
@@ -241,7 +241,7 @@
             gtMine: begin
                 if (Gear^.State and gstMoving) <> 0 then bonuses.activity:= true;
 
-                if ((Gear^.State and gstAttacking) = 0) and (((cMineDudPercent < 90) and (Gear^.Health <> 0))
+                if ((Gear^.State and gstAttacking) = 0) and (((cMineDudPercent < 90) or ((Gear^.State and gstWait) <> 0) and (Gear^.Health <> 0))
                 or (isAfterAttack and (Gear^.Health = 0) and (Gear^.Damage > 30))) then
                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 50, -50)
                 else if (Gear^.State and gstAttacking) <> 0 then