# HG changeset patch # User Wuzzy # Date 1492898149 -7200 # Node ID 82951b9b3c2fb9be016ee528c6d6facb6d6897a4 # Parent cbc34bb96b1f9756ef415958814616afdef9728d Fix hog not getting new ammo in Highlander when it takes 2 consecutive turns This happens when all enemy hogs are frozen diff -r cbc34bb96b1f -r 82951b9b3c2f ChangeLog.txt --- a/ChangeLog.txt Sat Apr 22 23:30:46 2017 +0200 +++ b/ChangeLog.txt Sat Apr 22 23:55:49 2017 +0200 @@ -45,6 +45,7 @@ Highlander: + Show collected weapons after kill and play sound + Mission panel now shows all game modifiers (e.g. mines time, vampirism, etc.) + * Fix hog not receiving new ammo when it takes two consecutive turns (happens when all enemy hogs are frozen) Construction Mode: + Added script parameter support: diff -r cbc34bb96b1f -r 82951b9b3c2f share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Sat Apr 22 23:30:46 2017 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua Sat Apr 22 23:55:49 2017 +0200 @@ -118,8 +118,6 @@ local atkChoices = {} local utilChoices = {} -local currHog -local lastHog local started = false local switchStage = 0 @@ -311,33 +309,19 @@ runOnGears(ConvertValues) end -function CheckForHogSwitch() - - if (CurrentHedgehog ~= nil) then - - currHog = CurrentHedgehog - - if currHog ~= lastHog then - - -- re-assign ammo to this guy, so that his entire ammo set will - -- be visible during another player's turn - if lastHog ~= nil then - ConvertValues(lastHog) - end - - -- give the new hog what he is supposed to have, too - ConvertValues(CurrentHedgehog) - - end - - lastHog = currHog - +function AssignHogAmmo() + -- Re-assign ammo to this guy, so that his entire ammo set will + -- be visible during another player's turn + if lastHog ~= nil then + ConvertValues(lastHog) end + -- Give the new hog what he is supposed to have, too + ConvertValues(CurrentHedgehog) end function onNewTurn() - CheckForHogSwitch() + AssignHogAmmo() end --function onGameTick20()