hedgewars/GSHandlers.inc
changeset 2934 e0f2b0f97c2b
parent 2933 02af54eb7e1e
child 2935 b80800979436
--- a/hedgewars/GSHandlers.inc	Fri Mar 05 02:17:03 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Mar 05 02:19:42 2010 +0000
@@ -1269,7 +1269,7 @@
         doStepFallingGear(Gear);
         CalcRotationDirAngle(Gear)
         end;
-	if V < _0_001 then Gear^.dX:= _0;
+	if hwAbs(Gear^.dX) < _0_001 then Gear^.dX:= _0;
     
 	if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then
 		AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke);
@@ -1314,7 +1314,7 @@
         Gear^.Y:= Gear^.Y + Gear^.dY;
 	    if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY:= _0
         end;
-    if V > _0_001 then SetAllHHToActive;
+    if Gear^.dY < _0_001 then SetAllHHToActive;
 	if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then
 		begin
         if (V > _0_02) and (k = gtExplosives) and ((Gear^.State and gstAnimation) <> 0) then