hedgewars/uAIMisc.pas
changeset 53 0e27949850e3
parent 4 bcbd7adb4e4b
child 64 9df467527ae5
equal deleted inserted replaced
52:ae2950c5465c 53:0e27949850e3
   180 begin
   180 begin
   181 Result:= false;
   181 Result:= false;
   182 repeat
   182 repeat
   183 pX:= round(Gear.X);
   183 pX:= round(Gear.X);
   184 pY:= round(Gear.Y);
   184 pY:= round(Gear.Y);
   185 if pY + cHHHalfHeight >= cWaterLine then exit;
   185 if pY + cHHRadius >= cWaterLine then exit;
   186 if (Gear.State and gstFalling) <> 0 then
   186 if (Gear.State and gstFalling) <> 0 then
   187    begin
   187    begin
   188    Gear.dY:= Gear.dY + cGravity;
   188    Gear.dY:= Gear.dY + cGravity;
   189    if Gear.dY > 0.35 then exit;
   189    if Gear.dY > 0.35 then exit;
   190    Gear.Y:= Gear.Y + Gear.dY;
   190    Gear.Y:= Gear.Y + Gear.dY;