hedgewars/uGearsHandlersRope.pas
changeset 12700 16fcd59295e3
parent 12695 28210d2a9a36
child 12819 3fc7569c1203
--- a/hedgewars/uGearsHandlersRope.pas	Thu Oct 12 20:30:39 2017 +0200
+++ b/hedgewars/uGearsHandlersRope.pas	Fri Oct 13 17:09:45 2017 +0200
@@ -66,7 +66,7 @@
     or (TestCollisionYwithGear(HHGear, 1) <> 0) then
         begin
         DeleteGear(Gear);
-        if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amRope) then
+        if (TestCollisionYwithGear(HHGear, 1) <> 0) and (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
             SetWeapon(amRope);
         isCursorVisible := false;
         ApplyAmmoChanges(HHGear^.Hedgehog^);
@@ -451,7 +451,7 @@
         HHGear^.State := HHGear^.State and (not (gstAttacking or gstHHJumping or gstHHHJump));
         HHGear^.Message := HHGear^.Message and (not gmAttack);
         DeleteGear(Gear);
-        if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and (HHGear^.Hedgehog^.CurAmmoType <> amRope) then
+        if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
             SetWeapon(amRope);
         exit()
         end;
@@ -545,7 +545,7 @@
                 Message := Message and (not gmAttack)
                 end;
         DeleteGear(Gear);
-        if GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amRope))^.Count >= 1 then
+        if (GetAmmoEntry(HHGear^.Hedgehog^, amRope)^.Count >= 1) and ((Ammoz[HHGear^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then
             SetWeapon(amRope);
         exit;
         end;