hedgewars/uGearsHedgehog.pas
changeset 7373 d5ec4e4eb2d5
parent 7347 88685fbb2679
parent 7362 53bcfc714cb3
child 7390 27bfd8bbde7e
--- a/hedgewars/uGearsHedgehog.pas	Sun Jul 08 13:29:06 2012 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Mon Jul 09 16:42:13 2012 +0400
@@ -957,11 +957,11 @@
             SetLittle(Gear^.dX);
 
 if (not isFalling)
-and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then
+  and (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then
     begin
     Gear^.State:= Gear^.State and (not gstWinner);
     Gear^.State:= Gear^.State and (not gstMoving);
-    while TestCollisionYWithGear(Gear,1) = 0 do
+    while (TestCollisionYWithGear(Gear,1) = 0) and not CheckGearDrowning(Gear) do
         Gear^.Y:= Gear^.Y+_1;
     SetLittle(Gear^.dX);
     Gear^.dY:= _0