hedgewars/uAIAmmoTests.pas
changeset 15602 583080b0272b
parent 15600 7d3877231b00
child 15603 ac44dae6425e
--- a/hedgewars/uAIAmmoTests.pas	Sat Jun 06 20:22:57 2020 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Sat Jun 06 20:51:12 2020 +0200
@@ -30,7 +30,7 @@
 var windSpeed: real;
 
 type TAttackParams = record
-        Time, AttacksNum: Longword;
+        Time, Bounce, AttacksNum: Longword;
         Angle, Power: LongInt;
         ExplX, ExplY, ExplR: LongInt;
         AttackPutX, AttackPutY: LongInt;
@@ -548,6 +548,7 @@
 begin
 valueResult:= BadTurn;
 TestTime:= 0;
+ap.Bounce:= 0;
 ap.ExplR:= 0;
 meX:= hwFloat2Float(Me^.X);
 meY:= hwFloat2Float(Me^.Y);
@@ -612,6 +613,7 @@
 Flags:= Flags; // avoid compiler hint
 valueResult:= BadTurn;
 TestTime:= 500;
+ap.Bounce:= 0;
 ap.ExplR:= 0;
 meX:= hwFloat2Float(Me^.X);
 meY:= hwFloat2Float(Me^.Y);
@@ -1508,6 +1510,11 @@
     ap.Angle:= 0;
     ap.Power:= 1;
     ap.Time:= 0;
+    if (Level < 5) then
+        // Set minimum mine bounciness for improved aim
+        ap.Bounce:= 1
+    else
+        ap.Bounce:= 0;
     ap.ExplR:= 100;
     ap.ExplX:= EX;
     ap.ExplY:= EY