hedgewars/uGearsHandlersMess.pas
changeset 12825 4c1c468725ff
parent 12820 92218a06c9ff
child 12828 e2e372449c19
--- a/hedgewars/uGearsHandlersMess.pas	Fri Nov 03 02:23:41 2017 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Nov 03 04:14:33 2017 +0100
@@ -2628,7 +2628,7 @@
             end;
         DeleteGear(Gear);
         if (GetAmmoEntry(HHGear^.Hedgehog^, amParachute)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
-            SetWeapon(amParachute);
+            HHGear^.Hedgehog^.CurAmmoType:= amParachute;
         isCursorVisible := false;
         ApplyAmmoChanges(HHGear^.Hedgehog^);
         exit
@@ -4051,7 +4051,7 @@
                 end;
             DeleteGear(Gear);
             if (GetAmmoEntry(HHGear^.Hedgehog^, amJetpack)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
-                SetWeapon(amJetpack);
+                HHGear^.Hedgehog^.CurAmmoType:= amJetpack;
             isCursorVisible := false;
             ApplyAmmoChanges(HHGear^.Hedgehog^);
         //    if Gear^.Tex <> nil then FreeTexture(Gear^.Tex);