Don't let jumping hedgehog to move others
authorunc0rr
Sun, 01 Jun 2008 12:16:24 +0000
changeset 967 8be3938d73c2
parent 966 664ae90b5b0c
child 968 d43d031bd307
Don't let jumping hedgehog to move others
hedgewars/uCollisions.pas
hedgewars/uFloat.pas
--- a/hedgewars/uCollisions.pas	Fri May 30 21:27:03 2008 +0000
+++ b/hedgewars/uCollisions.pas	Sun Jun 01 12:16:24 2008 +0000
@@ -194,6 +194,9 @@
 if flag then
    begin
    if hwAbs(Gear^.dX) < cHHKick then exit;
+   if (Gear^.State and gstHHJumping <> 0)
+   and (hwAbs(Gear^.dX) < _0_4) then exit;
+
    mx:= hwRound(Gear^.X);
    my:= hwRound(Gear^.Y);
 
@@ -242,6 +245,10 @@
 if flag then
    begin
    if hwAbs(Gear^.dY) < cHHKick then exit(true);
+   if (Gear^.State and gstHHJumping <> 0)
+   and (not Gear^.dY.isNegative)
+   and (Gear^.dY < _0_4) then exit;
+
    mx:= hwRound(Gear^.X);
    my:= hwRound(Gear^.Y);
 
--- a/hedgewars/uFloat.pas	Fri May 30 21:27:03 2008 +0000
+++ b/hedgewars/uFloat.pas	Sun Jun 01 12:16:24 2008 +0000
@@ -122,7 +122,7 @@
           _10000: hwFloat = (isNegative: false; QWordValue:  4294967296 * 10000);
 
          cLittle: hwFloat = (isNegative: false; QWordValue:           1);
-         cHHKick: hwFloat = (isNegative: false; QWordValue:   128849018);  // _0_03
+         cHHKick: hwFloat = (isNegative: false; QWordValue:    42949673);  // _0_01
 {$WARNINGS ON}
 {$ENDIF}