hedgewars/uAIMisc.pas
changeset 2376 ece7b87f1334
parent 1941 b1ef1f86148c
child 2587 0dfa56a8513c
equal deleted inserted replaced
2375:99f05a01a6a3 2376:ece7b87f1334
   294                  Gear^.dX:= SignAs(_0_15, Gear^.dX);
   294                  Gear^.dX:= SignAs(_0_15, Gear^.dX);
   295                  Gear^.State:= Gear^.State or gstMoving or gstHHJumping
   295                  Gear^.State:= Gear^.State or gstMoving or gstHHJumping
   296                  end else exit(Result)
   296                  end else exit(Result)
   297               end
   297               end
   298     end;
   298     end;
   299     
   299 
   300 repeat
   300 repeat
   301 if not (hwRound(Gear^.Y) + cHHRadius < cWaterLine) then exit(Result);
   301 if not (hwRound(Gear^.Y) + cHHRadius < cWaterLine) then exit(Result);
   302 if (Gear^.State and gstMoving) <> 0 then
   302 if (Gear^.State and gstMoving) <> 0 then
   303    begin
   303    begin
   304    if (GoInfo.Ticks = 350) then
   304    if (GoInfo.Ticks = 350) then
   437 
   437 
   438 function AIrndSign(num: LongInt): LongInt;
   438 function AIrndSign(num: LongInt): LongInt;
   439 begin
   439 begin
   440 if random(2) = 0 then AIrndSign:=   num
   440 if random(2) = 0 then AIrndSign:=   num
   441                  else AIrndSign:= - num
   441                  else AIrndSign:= - num
   442 end;  
   442 end;
   443 
   443 
   444 end.
   444 end.