hedgewars/uGearsHandlersRope.pas
changeset 12692 cb6b70392459
parent 12651 5e115ed19e27
child 12695 28210d2a9a36
--- a/hedgewars/uGearsHandlersRope.pas	Wed Oct 11 20:16:00 2017 +0200
+++ b/hedgewars/uGearsHandlersRope.pas	Wed Oct 11 23:01:07 2017 +0200
@@ -449,6 +449,8 @@
         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
+            SetWeapon(amRope);
         exit()
         end;
 
@@ -541,6 +543,8 @@
                 Message := Message and (not gmAttack)
                 end;
         DeleteGear(Gear);
+        if GetAmmoEntry(HHGear^.Hedgehog^, TAmmoType(amRope))^.Count >= 1 then
+            SetWeapon(amRope);
         exit;
         end;
     if CheckGearDrowning(HHGear) then DeleteGear(Gear)