hedgewars/uAIAmmoTests.pas
changeset 554 4f83b3de17c7
parent 543 465e2ec8f05f
child 556 49675457d76e
equal deleted inserted replaced
553:5478386d935f 554:4f83b3de17c7
   287     fexit: boolean;
   287     fexit: boolean;
   288     i, t, Result: LongInt;
   288     i, t, Result: LongInt;
   289 begin
   289 begin
   290 ap.ExplR:= 0;
   290 ap.ExplR:= 0;
   291 ap.Time:= 0;
   291 ap.Time:= 0;
       
   292 if (Level > 3) then exit(BadTurn);
       
   293 
   292 ap.AttackPutX:= Targ.X;
   294 ap.AttackPutX:= Targ.X;
   293 ap.AttackPutY:= Targ.Y;
   295 ap.AttackPutY:= Targ.Y;
   294 
   296 
   295 X:= int2hwFloat(Targ.X - 135);
   297 X:= int2hwFloat(Targ.X - 135);
   296 X:= X - cBombsSpeed * hwSqrt(int2hwFloat((Targ.Y + 128) * 2) / cGravity);
   298 X:= X - cBombsSpeed * hwSqrt(int2hwFloat((Targ.Y + 128) * 2) / cGravity);