hedgewars/GSHandlers.inc
changeset 3216 d94262b521ae
parent 3203 e98ac205ba29
child 3236 4ab3917d7d44
--- 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;