AI: Fix starting height of airborne attacks
authorWuzzy <Wuzzy2@mail.ru>
Sun, 05 Jul 2020 20:29:37 +0200
changeset 15698 6de74494b8a5
parent 15697 c9a7ee0e3265
child 15699 785c1af0bf87
AI: Fix starting height of airborne attacks
hedgewars/uAIAmmoTests.pas
--- a/hedgewars/uAIAmmoTests.pas	Sun Jul 05 20:22:08 2020 +0200
+++ b/hedgewars/uAIAmmoTests.pas	Sun Jul 05 20:29:37 2020 +0200
@@ -1417,7 +1417,7 @@
 bombsSpeed:= hwFloat2Float(cBombsSpeed);
 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
-Y:= -128;
+Y:= topY - 300;
 
 dX:= bombsSpeed;
 dY:= 0;
@@ -1494,7 +1494,7 @@
 bombsSpeed:= hwFloat2Float(cBombsSpeed);
 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
-Y:= -128;
+Y:= topY - 300;
 
 valueResult:= 0;
 
@@ -1642,7 +1642,7 @@
 minesSpeed:= hwFloat2Float(cBombsSpeed);
 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
 X:= X - minesSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
-Y:= -128;
+Y:= topY - 300;
 dX:= minesSpeed;
 dY:= 0;
 
@@ -1794,7 +1794,7 @@
 ap.AttackPutY:= Targ.Point.Y;
 
 X:= Targ.Point.X;
-Y:= -128;
+Y:= -1024;
 
 for i:= 0 to BOUNCES-1 do
     dmg[i]:= 0;