hedgewars/uAIAmmoTests.pas
changeset 3438 670324167e42
parent 3433 566788d32e52
child 3439 a98984e4f458
equal deleted inserted replaced
3437:858105ae769c 3438:670324167e42
   651   Level:= Level; // avoid compiler hint
   651   Level:= Level; // avoid compiler hint
   652   FillBonuses(true, [gtCase]);
   652   FillBonuses(true, [gtCase]);
   653   if bonuses.Count = 0 then begin
   653   if bonuses.Count = 0 then begin
   654     if Me^.Health <= 100  then begin
   654     if Me^.Health <= 100  then begin
   655 	  maxTop := Targ.Y - cHHRadius * 2; 
   655 	  maxTop := Targ.Y - cHHRadius * 2; 
   656 	  while(not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY)) do
   656 	  while(not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY + cHHRadius * 2 + 1)) do
   657 	  	dec(maxTop, cHHRadius*2);
   657 	  	dec(maxTop, cHHRadius*2);
   658 	  if(not TestColl(Targ.X, maxTop + cHHRadius, cHHRadius)) then begin
   658 	  if(not TestColl(Targ.X, maxTop + cHHRadius, cHHRadius)) then begin
   659         ap.AttackPutX := Targ.X;
   659         ap.AttackPutX := Targ.X;
   660         ap.AttackPutY := maxTop + cHHRadius;
   660         ap.AttackPutY := maxTop + cHHRadius;
   661         TestTeleport := Targ.Y - maxTop;
   661         TestTeleport := Targ.Y - maxTop;