Due to the small values and friction, halve the step in low gravity, instead of the value
authornemo
Sat, 05 Nov 2011 20:51:15 -0400
changeset 6295 5b2b304a91ec
parent 6294 34aa727d4a25
child 6296 0cd63375e80b
Due to the small values and friction, halve the step in low gravity, instead of the value
hedgewars/HHHandlers.inc
hedgewars/uFloat.pas
--- a/hedgewars/HHHandlers.inc	Sat Nov 05 20:09:48 2011 -0400
+++ b/hedgewars/HHHandlers.inc	Sat Nov 05 20:51:15 2011 -0400
@@ -1129,14 +1129,14 @@
         else
             doStepHedgehogDriven(Gear)
     end;
-
-if ((GameTicks mod 50) = 0) and (Gear^.Message and (gmAllStoppable or gmLJump or gmHJump) = 0) and
+if (Gear^.Message and (gmAllStoppable or gmLJump or gmHJump) = 0) and
    (Gear^.State and (gstHHJumping or gstHHHJump or gstAttacking) = 0) and
    not Gear^.dY.isNegative and
+   (GameTicks mod (100*hwRound(cMaxWindSpeed/(cGravity/2))) = 0) and 
    (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
     begin
     slope:= CalcSlopeBelowGear(Gear);
-    Gear^.dX:=Gear^.dX+cGravity*_128*slope;
+    Gear^.dX:=Gear^.dX+slope*_0_07;
     if slope.QWordValue <> 0 then Gear^.State:= Gear^.State or gstMoving;
 (*
     x:= hwRound(Gear^.X);
--- a/hedgewars/uFloat.pas	Sat Nov 05 20:09:48 2011 -0400
+++ b/hedgewars/uFloat.pas	Sat Nov 05 20:51:15 2011 -0400
@@ -115,6 +115,7 @@
            _0_01: hwFloat = (isNegative: false; QWordValue:    42949673);
            _0_02: hwFloat = (isNegative: false; QWordValue:    85899345);
            _0_03: hwFloat = (isNegative: false; QWordValue:   128849018);
+           _0_07: hwFloat = (isNegative: false; QWordValue:   300647710);
            _0_08: hwFloat = (isNegative: false; QWordValue:   343597383);
             _0_1: hwFloat = (isNegative: false; QWordValue:   429496730);
            _0_15: hwFloat = (isNegative: false; QWordValue:   644245094);