hedgewars/GSHandlers.inc
changeset 2937 da06c25edf1d
parent 2936 ed4c315dab2d
child 2938 451f917ac46c
--- a/hedgewars/GSHandlers.inc	Fri Mar 05 02:23:57 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Mar 05 02:28:03 2010 +0000
@@ -1264,13 +1264,13 @@
     V:= hwSqr(Gear^.dX) + hwSqr(Gear^.dY);
     //if V > _0_03 then Gear^.State:= Gear^.State or gstAnimation;
     if hwAbs(Gear^.dX) > _0_15 then Gear^.State:= Gear^.State or gstAnimation;
+    if ((Gear^.State and gstAnimation) = 0) or (hwAbs(Gear^.dX) < _0_001) then Gear^.dX:= _0;
     if ((Gear^.State and gstAnimation) <> 0) and (Gear^.dX.QWordValue <> 0) and (Gear^.dY.QWordValue <> 0)  then
         begin
         AllInactive:= false;
         doStepFallingGear(Gear);
         CalcRotationDirAngle(Gear)
         end;
-	if hwAbs(Gear^.dX) < _0_0002 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);