# HG changeset patch # User unc0rr # Date 1208018088 0 # Node ID 6f567934cc4461efad22f6b6080d8e7ae3575e05 # Parent 5687fa57a6c1f1c7c5eaa967aff6c8a4ed0ac343 Automatically use parachute when vertical speed is high enough diff -r 5687fa57a6c1 -r 6f567934cc44 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sat Apr 05 17:06:26 2008 +0000 +++ b/hedgewars/HHHandlers.inc Sat Apr 12 16:34:48 2008 +0000 @@ -407,15 +407,21 @@ exit end; -if ((Gear^.State and gstMoving) <> 0) - or (StepTicks = cHHStepTicks) - or (CurAmmoGear <> nil) then // we're moving - begin - // check for case with ammo - t:= CheckGearNear(Gear, gtCase, 36, 36); - if t <> nil then - PickUp(Gear, t) - end; +if ((Gear^.State and gstMoving) <> 0) then + begin + if (StepTicks = cHHStepTicks) + or (CurAmmoGear <> nil) then // we're moving + begin + // check for case with ammo + t:= CheckGearNear(Gear, gtCase, 36, 36); + if t <> nil then + PickUp(Gear, t) + end else + 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 5687fa57a6c1 -r 6f567934cc44 hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Sat Apr 05 17:06:26 2008 +0000 +++ b/hedgewars/uFloat.pas Sat Apr 12 16:34:48 2008 +0000 @@ -85,6 +85,7 @@ _0_25: hwFloat = (isNegative: false; QWordValue: 1073741824); _0_3: hwFloat = (isNegative: false; QWordValue: 1288490189); _0_35: hwFloat = (isNegative: false; QWordValue: 1503238553); + _0_39: hwFloat = (isNegative: false; QWordValue: 1675037245); _0_4: hwFloat = (isNegative: false; QWordValue: 1717986918); _0_45: hwFloat = (isNegative: false; QWordValue: 1932735283); _0_5: hwFloat = (isNegative: false; QWordValue: 2147483648);