hedgewars/uGearsHedgehog.pas
changeset 7362 53bcfc714cb3
parent 7339 5984b749ad9b
child 7373 d5ec4e4eb2d5
child 7375 16ae2e1c9005
equal deleted inserted replaced
7360:d833d1010710 7362:53bcfc714cb3
   955             Gear^.dX:= -Gear^.Elasticity * Gear^.dX
   955             Gear^.dX:= -Gear^.Elasticity * Gear^.dX
   956         else
   956         else
   957             SetLittle(Gear^.dX);
   957             SetLittle(Gear^.dX);
   958 
   958 
   959 if (not isFalling)
   959 if (not isFalling)
   960 and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then
   960   and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then
   961     begin
   961     begin
   962     Gear^.State:= Gear^.State and (not gstWinner);
   962     Gear^.State:= Gear^.State and (not gstWinner);
   963     Gear^.State:= Gear^.State and (not gstMoving);
   963     Gear^.State:= Gear^.State and (not gstMoving);
   964     while TestCollisionYWithGear(Gear,1) = 0 do
   964     while (TestCollisionYWithGear(Gear,1) = 0) and not CheckGearDrowning(Gear) do
   965         Gear^.Y:= Gear^.Y+_1;
   965         Gear^.Y:= Gear^.Y+_1;
   966     SetLittle(Gear^.dX);
   966     SetLittle(Gear^.dX);
   967     Gear^.dY:= _0
   967     Gear^.dY:= _0
   968     end
   968     end
   969 else
   969 else