hedgewars/GSHandlers.inc
changeset 3002 9bf51d5a8a80
parent 3001 a1d1e0d0067a
child 3004 e9b3613cc3fb
--- a/hedgewars/GSHandlers.inc	Tue Mar 16 04:43:01 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Tue Mar 16 04:46:29 2010 +0000
@@ -206,12 +206,13 @@
     end 
 else if Gear^.AdvBounce and TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)) then collH:= -hwSign(Gear^.dX);
 
-if (collV <>0) and (collH <> 0) and Gear^.AdvBounce then
+if (collV <>0) and (collH <> 0) and (hwSqr(tdX) + hwSqr(tdY) > _0_08) and Gear^.AdvBounce then
     begin
     Gear^.dX:= tdY*Gear^.Elasticity*Gear^.Friction;
-    Gear^.dY:= tdX*Gear^.Elasticity*Gear^.Friction;
+    Gear^.dY:= tdX*Gear^.Elasticity;//*Gear^.Friction;
     if ((collV > 0) and (collH > 0)) or ((collV < 0) and (collH < 0)) then Gear^.dX.isNegative:=not tdY.isNegative
     else if (collV < 0) and (collH > 0) then Gear^.dY.isNegative:= not tdX.isNegative;
+    isFalling:= false;
 
     //tmp:= Gear^.dX.QWordValue;
     //Gear^.dX.QWordValue:= Gear^.dY.QWordValue;