hedgewars/uGearsHandlersMess.pas
changeset 9479 167dea42d7d7
parent 9477 0463f747e839
child 9485 3dee8a3b0406
--- a/hedgewars/uGearsHandlersMess.pas	Sun Sep 29 19:03:15 2013 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Sep 30 12:37:44 2013 -0400
@@ -384,8 +384,7 @@
 
     Gear^.X := Gear^.X + Gear^.dX;
     Gear^.Y := Gear^.Y + Gear^.dY;
-    if Gear^.Kind <> gtBee then
-        CheckGearDrowning(Gear);
+    CheckGearDrowning(Gear);
     //if (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) < _0_0002) and
     if (not isFalling) and ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_02.QWordValue) then
         Gear^.State := Gear^.State and (not gstMoving)
@@ -969,6 +968,7 @@
         dec(Gear^.Timer)
     else
         begin
+        Gear^.State:= Gear^.State and not gstSubmersible;
         if nuw then
            begin
             StopSoundChan(Gear^.SoundChannel);
@@ -3201,9 +3201,8 @@
     trueAngle: Longword;
     t: PGear;
 begin
-    if WorldWrap(Gear) then
-        begin
-        // recycling as temp vars
+    if WorldWrap(Gear) and (WorldEdge <> weWrap) then
+        begin
         Y.isNegative:= false;
         Y.QWordValue:= 4294967296 * 112;
         X.isNegative:= false;