# HG changeset patch # User unc0rr # Date 1208089766 0 # Node ID 1493f697d1bb49397378a57874a0e488cfe25252 # Parent 1faae19f21168c8dc312304d467d05d3e47c4e3f Fix broken logic for the new parachute feature diff -r 1faae19f2116 -r 1493f697d1bb hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sat Apr 12 18:16:12 2008 +0000 +++ b/hedgewars/HHHandlers.inc Sun Apr 13 12:29:26 2008 +0000 @@ -415,16 +415,15 @@ or (StepTicks = cHHStepTicks) or (CurAmmoGear <> nil) then // we're moving begin + with PHedgehog(Gear^.Hedgehog)^ do + if (CurAmmoGear = nil) + and (Gear^.dY > _0_39) + and (Ammo^[CurSlot, CurAmmo].AmmoType = amParachute) then Gear^.Message:= Gear^.Message or gm_Attack; // check for case with ammo t:= CheckGearNear(Gear, gtCase, 36, 36); if t <> nil then PickUp(Gear, t) - end else - if ((Gear^.State and gstMoving) <> 0) then - with PHedgehog(Gear^.Hedgehog)^ do - if (CurAmmoGear = nil) - and (Gear^.dY > _0_39) - and (Ammo^[CurSlot, CurAmmo].AmmoType = amParachute) then Gear^.Message:= Gear^.Message or gm_Attack; + end; if CurAmmoGear <> nil then begin diff -r 1faae19f2116 -r 1493f697d1bb hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Sat Apr 12 18:16:12 2008 +0000 +++ b/hedgewars/uCollisions.pas Sun Apr 13 12:29:26 2008 +0000 @@ -241,7 +241,7 @@ if flag then begin - if hwAbs(Gear^.dX) < cHHKick then exit(true); + if hwAbs(Gear^.dY) < cHHKick then exit(true); mx:= hwRound(Gear^.X); my:= hwRound(Gear^.Y);