hedgewars/uAIAmmoTests.pas
changeset 15676 6de74494b8a5
parent 15675 c9a7ee0e3265
child 15678 e933b1dc302d
equal deleted inserted replaced
15675:c9a7ee0e3265 15676:6de74494b8a5
  1415 ap.AttackPutY:= Targ.Point.Y;
  1415 ap.AttackPutY:= Targ.Point.Y;
  1416 
  1416 
  1417 bombsSpeed:= hwFloat2Float(cBombsSpeed);
  1417 bombsSpeed:= hwFloat2Float(cBombsSpeed);
  1418 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1418 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1419 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1419 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1420 Y:= -128;
  1420 Y:= topY - 300;
  1421 
  1421 
  1422 dX:= bombsSpeed;
  1422 dX:= bombsSpeed;
  1423 dY:= 0;
  1423 dY:= 0;
  1424 
  1424 
  1425 for i:= 0 to 9 do
  1425 for i:= 0 to 9 do
  1492 ap.AttackPutY:= Targ.Point.Y;
  1492 ap.AttackPutY:= Targ.Point.Y;
  1493 
  1493 
  1494 bombsSpeed:= hwFloat2Float(cBombsSpeed);
  1494 bombsSpeed:= hwFloat2Float(cBombsSpeed);
  1495 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1495 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1496 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1496 X:= X - bombsSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1497 Y:= -128;
  1497 Y:= topY - 300;
  1498 
  1498 
  1499 valueResult:= 0;
  1499 valueResult:= 0;
  1500 
  1500 
  1501 attackTime:= 6000;
  1501 attackTime:= 6000;
  1502 while attackTime >= 0 do
  1502 while attackTime >= 0 do
  1640 ap.AttackPutY:= Targ.Point.Y;
  1640 ap.AttackPutY:= Targ.Point.Y;
  1641 
  1641 
  1642 minesSpeed:= hwFloat2Float(cBombsSpeed);
  1642 minesSpeed:= hwFloat2Float(cBombsSpeed);
  1643 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1643 X:= Targ.Point.X - 135 - cShift; // hh center - cShift
  1644 X:= X - minesSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1644 X:= X - minesSpeed * sqrt(((Targ.Point.Y + 128) * 2) / cGravityf);
  1645 Y:= -128;
  1645 Y:= topY - 300;
  1646 dX:= minesSpeed;
  1646 dX:= minesSpeed;
  1647 dY:= 0;
  1647 dY:= 0;
  1648 
  1648 
  1649 for i:= 0 to 9 do
  1649 for i:= 0 to 9 do
  1650     begin
  1650     begin
  1792 ap.Angle:= 0;
  1792 ap.Angle:= 0;
  1793 ap.AttackPutX:= Targ.Point.X;
  1793 ap.AttackPutX:= Targ.Point.X;
  1794 ap.AttackPutY:= Targ.Point.Y;
  1794 ap.AttackPutY:= Targ.Point.Y;
  1795 
  1795 
  1796 X:= Targ.Point.X;
  1796 X:= Targ.Point.X;
  1797 Y:= -128;
  1797 Y:= -1024;
  1798 
  1798 
  1799 for i:= 0 to BOUNCES-1 do
  1799 for i:= 0 to BOUNCES-1 do
  1800     dmg[i]:= 0;
  1800     dmg[i]:= 0;
  1801 
  1801 
  1802 i:= 1;
  1802 i:= 1;