hedgewars/uGearsHandlersRope.pas
changeset 12821 f3e07e53460d
parent 12819 3fc7569c1203
child 13069 ba7ac61c7668
--- a/hedgewars/uGearsHandlersRope.pas	Fri Nov 03 04:14:33 2017 +0100
+++ b/hedgewars/uGearsHandlersRope.pas	Fri Nov 03 05:03:47 2017 +0100
@@ -66,6 +66,8 @@
     or (TestCollisionYwithGear(HHGear, 1) <> 0) then
         begin
         DeleteGear(Gear);
+        if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
+            HHGear^.Hedgehog^.CurAmmoType:= amRope;
         isCursorVisible := false;
         ApplyAmmoChanges(HHGear^.Hedgehog^);
         exit
@@ -450,7 +452,9 @@
         HHGear^.Message := HHGear^.Message and (not gmAttack);
         DeleteGear(Gear);
         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
-            SetWeapon(amRope);
+            HHGear^.Hedgehog^.CurAmmoType:= amRope;
+        isCursorVisible := false;
+        ApplyAmmoChanges(HHGear^.Hedgehog^);
         exit()
         end;
 
@@ -544,7 +548,9 @@
                 end;
         DeleteGear(Gear);
         if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
-            SetWeapon(amRope);
+            HHGear^.Hedgehog^.CurAmmoType:= amRope;
+        isCursorVisible := false;
+        ApplyAmmoChanges(HHGear^.Hedgehog^);
         exit;
         end;
     if CheckGearDrowning(HHGear) then DeleteGear(Gear)