hedgewars/uGearsHandlersMess.pas
changeset 12700 16fcd59295e3
parent 12693 2592c6ea6008
child 12712 31f7e0a31736
--- a/hedgewars/uGearsHandlersMess.pas	Thu Oct 12 20:30:39 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Oct 13 17:09:45 2017 +0200
@@ -2616,7 +2616,7 @@
             State := State or gstMoving;
             end;
         DeleteGear(Gear);
-        if (GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amParachute))^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amParachute) then
+        if (GetAmmoEntry(HHGear^.Hedgehog^, amParachute)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
             SetWeapon(amParachute);
         isCursorVisible := false;
         ApplyAmmoChanges(HHGear^.Hedgehog^);
@@ -4019,7 +4019,7 @@
                 State := State or gstMoving
                 end;
             DeleteGear(Gear);
-            if (GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amJetpack))^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amJetpack) then
+            if (GetAmmoEntry(HHGear^.Hedgehog^, amJetpack)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
                 SetWeapon(amJetpack);
             isCursorVisible := false;
             ApplyAmmoChanges(HHGear^.Hedgehog^);