Reset MultiShootAttacks to 0 when calling SwitchHog in Lua
authorWuzzy <Wuzzy2@mail.ru>
Thu, 23 May 2019 08:34:30 +0200
changeset 15053 b181ff6367c9
parent 15052 8cde6fb2fabd
child 15054 1bce780e55ac
Reset MultiShootAttacks to 0 when calling SwitchHog in Lua
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Wed May 22 23:32:22 2019 +0200
+++ b/hedgewars/uScript.pas	Thu May 23 08:34:30 2019 +0200
@@ -1724,6 +1724,7 @@
 // should we allow this when there is no current hedgehog? might do some odd(er) things to turn sequence.
         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) and (CurrentHedgehog <> nil) then
             begin
+            CurrentHedgehog^.MultiShootAttacks:= 0;
             prevgear := CurrentHedgehog^.Gear;
             if prevgear <> nil then
                 begin