# HG changeset patch # User unc0rr # Date 1203963012 0 # Node ID a6f442173822e7bfca549b0b191b5016d962d767 # Parent 3d976d2579eb3d66782598c867501f86cb37cf4d Make high jump behaviour like in worms (back somersault) diff -r 3d976d2579eb -r a6f442173822 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sun Feb 24 20:00:31 2008 +0000 +++ b/hedgewars/HHHandlers.inc Mon Feb 25 18:10:12 2008 +0000 @@ -323,6 +323,10 @@ if not Gear^.dY.isNegative then begin CheckHHDamage(Gear); + + if ((Gear^.State and gstHHHJump) <> 0) and + (Gear^.dX.QWordValue < _0_02.QWordValue) then Gear^.dX.isNegative:= not Gear^.dX.isNegative; // landing after high jump + Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump); Gear^.dY:= _0; end else Gear^.dY:= Gear^.dY + cGravity; @@ -427,7 +431,7 @@ begin Gear^.State:= Gear^.State or gstHHHJump or gstMoving; Gear^.dY:= -_0_25; - Gear^.dX:= SignAs(_0_02, Gear^.dX) + Gear^.dX:= -SignAs(_0_02, Gear^.dX) end; Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump);