--- a/hedgewars/HHHandlers.inc Fri Sep 15 20:38:25 2006 +0000
+++ b/hedgewars/HHHandlers.inc Sat Sep 16 15:15:30 2006 +0000
@@ -321,16 +321,16 @@
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -3, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.90; Gear.Y:= Gear.Y - 3 end else
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -4, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.87; Gear.Y:= Gear.Y - 4 end else
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -5, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.84; Gear.Y:= Gear.Y - 5 end else
- if abs(Gear.dX) > 0.02 then Gear.dX:= -0.2 * Gear.dX
+ if abs(Gear.dX) > 0.02 then Gear.dX:= -Gear.Elasticity * Gear.dX
else begin
Gear.State:= Gear.State and not gstMoving;
Gear.dX:= 0.0000001 * hwSign(Gear.dX)
end
- else begin
- Gear.State:= Gear.State and not gstMoving;
- Gear.dX:= 0.0000001 * hwSign(Gear.dX)
- end
- else Gear.dX:= -Gear.dX;
+ else begin
+ Gear.State:= Gear.State and not gstMoving;
+ Gear.dX:= 0.0000001 * hwSign(Gear.dX)
+ end
+ else Gear.dX:= -Gear.Elasticity * Gear.dX;
if ((Gear.State and gstFalling) = 0)and
(sqr(Gear.dX) + sqr(Gear.dY) < 0.0008) then