Fix un-selecting weapon while in multishoot allowing another attack
authorWuzzy <Wuzzy2@mail.ru>
Tue, 21 May 2019 16:32:34 +0200
changeset 15043 9a7a5833fad2
parent 15042 62e3853fa2ed
child 15044 9a8c678df7d9
Fix un-selecting weapon while in multishoot allowing another attack
hedgewars/uGearsHedgehog.pas
hedgewars/uVariables.pas
--- a/hedgewars/uGearsHedgehog.pas	Tue May 21 15:15:17 2019 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Tue May 21 16:32:34 2019 +0200
@@ -147,14 +147,6 @@
 
 HHGear^.Message:= HHGear^.Message and (not gmWeapon);
 
-// Special case: amNothing unselects weapon
-if weap = amNothing then
-    begin
-    HHGear^.Hedgehog^.CurAmmoType:= amNothing;
-    ApplyAmmoChanges(HHGear^.Hedgehog^);
-    exit
-    end;
-
 if Hedgehog^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then
     exit; // weapon is not activated yet
 
--- a/hedgewars/uVariables.pas	Tue May 21 15:15:17 2019 +0200
+++ b/hedgewars/uVariables.pas	Tue May 21 16:32:34 2019 +0200
@@ -905,7 +905,7 @@
             minAngle: 0;
             maxAngle: 0;
             isDamaging: false;
-            SkipTurns: 9999;
+            SkipTurns: 0;
             PosCount: 0;
             PosSprite: sprWater;
             ejectX: 0;