clear gstCollision from doStepFallingGear once I'm done with it. hog "physics" doesn't use it, and was screwing up labels
authornemo
Sat, 14 Dec 2013 14:24:03 -0500
changeset 9795 487e5675061f
parent 9794 05b9eedff805
child 9796 a05105e35d49
clear gstCollision from doStepFallingGear once I'm done with it. hog "physics" doesn't use it, and was screwing up labels
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Sat Dec 14 01:03:10 2013 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Sat Dec 14 14:24:03 2013 -0500
@@ -877,7 +877,8 @@
             Gear^.dX:= Gear^.dX * _0_8
             end;
         if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then
-            Gear^.dY:= _0
+            Gear^.dY:= _0;
+        Gear^.State:= Gear^.State and not gstCollision 
         end;
     Gear^.State:= Gear^.State or gstMoving;
     if (CurrentHedgehog^.Gear = Gear) and (CurrentHedgehog^.Gear^.State and gstHHDriven <> 0) and
@@ -931,7 +932,8 @@
             Gear^.State:= Gear^.State and (not (gstHHJumping or gstHHHJump));
             if (land and lfBouncy = 0) or (Gear^.dX.QWordValue < _0_02.QWordValue) then
                 Gear^.dY:= _0
-            end
+            end;
+        Gear^.State:= Gear^.State and not gstCollision 
         end
     else
         Gear^.dY:= Gear^.dY + cGravity;
@@ -1055,7 +1057,8 @@
             CheckHHDamage(Gear);
             Gear^.dY:= _0;
             Gear^.Y:= Gear^.Y + _1
-            end
+            end;
+        Gear^.State:= Gear^.State and not gstCollision 
         end;
 
     CheckGearDrowning(Gear);