# HG changeset patch # User unc0rr # Date 1171113281 0 # Node ID 4598c21bb4219dc6617ebd5da4d231133f5d0036 # Parent 5f4559ce706239f718150b646240132db42aa7d4 Disable cheat trick with hjump diff -r 5f4559ce7062 -r 4598c21bb421 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sat Feb 10 12:52:14 2007 +0000 +++ b/hedgewars/HHHandlers.inc Sat Feb 10 13:14:41 2007 +0000 @@ -257,7 +257,7 @@ TurnTimeLeft:= 0; Gear^.State:= Gear^.State and not gstHHDriven; if Gear^.Damage > 0 then - Gear^.State:= Gear^.State and not gstHHJumping; + Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump); exit end; if ((Gear^.State and gstFalling) <> 0) or (StepTicks = cHHStepTicks) @@ -280,11 +280,12 @@ if (Gear^.State and gstFalling) <> 0 then begin - // it could be the source to trick: hwFloat-backspace jump -> vertical wall - // collision - > (abs(Gear^.dX) < 0.0000002) -> backspace -> even more high jump - if ((Gear^.Message and gm_HJump) <> 0) and ((Gear^.State and gstHHJumping) <> 0) then - if (hwAbs(Gear^.dX) < cLittle + cLittle) and (Gear^.dY < -_0_02) then + if ((Gear^.Message and gm_HJump) <> 0) and + ((Gear^.State and gstHHJumping) <> 0) and + ((Gear^.State and gstHHHJump) = 0) then + if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then begin + Gear^.State:= Gear^.State or gstHHHJump; Gear^.dY:= -_0_25; Gear^.dX:= hwSign(Gear^.dX) * _0_02 end; @@ -299,7 +300,7 @@ CheckHHDamage(Gear); if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55) and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); - Gear^.State:= Gear^.State and not (gstFalling or gstHHJumping); + Gear^.State:= Gear^.State and not (gstFalling or gstHHJumping or gstHHHJump); StepTicks:= 300; Gear^.dY:= 0 end; diff -r 5f4559ce7062 -r 4598c21bb421 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sat Feb 10 12:52:14 2007 +0000 +++ b/hedgewars/uConsts.pas Sat Feb 10 13:14:41 2007 +0000 @@ -144,6 +144,7 @@ gsttmpFlag = $00000200; gstHHThinking = $00000800; gstNoDamage = $00001000; + gstHHHJump = $00002000; gm_Left = $00000001; gm_Right = $00000002;