Make bots wait a bit if there are air mines moving
authorunC0Rr
Mon, 13 Jan 2025 11:39:58 +0100
changeset 16095 b68e513d1416
parent 16094 33f09636018b
child 16096 dbdb98dafd80
Make bots wait a bit if there are air mines moving
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Mon Jan 27 15:48:24 2025 +0100
+++ b/hedgewars/uAIMisc.pas	Mon Jan 13 11:39:58 2025 +0100
@@ -275,7 +275,14 @@
                 else if (Gear^.State and gstAttacking) <> 0 then
                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 100, -50); // mine is on
                 end;
-            gtAirMine: if ((Gear^.State and gstFrozen) = 0) then AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), gear^.Angle+5, -30);
+                
+            gtAirMine: if ((Gear^.State and gstFrozen) = 0) then 
+                begin
+                AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), gear^.Angle+5, -30);
+                
+                if (Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue then
+                    bonuses.activity:= true
+                end;
 
             gtExplosives:
                 begin