hedgewars/uAIAmmoTests.pas
changeset 1296 d7fffad44b7e
parent 1293 5943efa67299
child 1507 d18c67b7ad4c
equal deleted inserted replaced
1295:27bec661581c 1296:d7fffad44b7e
   362 ap.Power:= 1;
   362 ap.Power:= 1;
   363 ap.Angle:= 0;
   363 ap.Angle:= 0;
   364 if (Abs(hwRound(Me^.X) - Targ.X) > 25)
   364 if (Abs(hwRound(Me^.X) - Targ.X) > 25)
   365 or (Abs(hwRound(Me^.Y) - 50 - Targ.Y) > 50) then
   365 or (Abs(hwRound(Me^.Y) - 50 - Targ.Y) > 50) then
   366 	begin
   366 	begin
   367 	if TestColl(hwRound(Me^.Y), hwRound(Me^.Y) - 16, 6) then
   367 	if TestColl(hwRound(Me^.Y), hwRound(Me^.Y) - 16, 6)
       
   368 	and (RateShove(Me, hwRound(Me^.X) + 10 * hwSign(Me^.dX), hwRound(Me^.Y) - 40, 30, 30) = 0) then
   368 		Result:= Succ(BadTurn)
   369 		Result:= Succ(BadTurn)
   369 	else
   370 	else
   370 		Result:= BadTurn;
   371 		Result:= BadTurn;
   371 	exit(Result)
   372 	exit(Result)
   372 	end;
   373 	end;