Only require a minimum speed if object is descending.
authornemo
Wed, 31 Mar 2010 20:44:38 +0000
changeset 3216 d94262b521ae
parent 3215 a1a057f77ada
child 3217 aecc0ebca774
Only require a minimum speed if object is descending.
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Mar 31 20:03:43 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Wed Mar 31 20:44:38 2010 +0000
@@ -216,7 +216,7 @@
 else if (Gear^.AdvBounce=1) and TestCollisionXwithGear(Gear, -hwSign(Gear^.dX)) then collH:= -hwSign(Gear^.dX);
 
 //if Gear^.AdvBounce and (collV <>0) and (collH <> 0) and (hwSqr(tdX) + hwSqr(tdY) > _0_08) then
-if (Gear^.AdvBounce=1) and (collV <>0) and (collH <> 0) and ((tdX.QWordValue + tdY.QWordValue) > _0_2.QWordValue) then
+if (Gear^.AdvBounce=1) and (collV <>0) and (collH <> 0) and ((collV=-1) or ((tdX.QWordValue + tdY.QWordValue) > _0_2.QWordValue)) then
     begin
     Gear^.dX:= tdY*Gear^.Elasticity*Gear^.Friction;
     Gear^.dY:= tdX*Gear^.Elasticity;//*Gear^.Friction;