# HG changeset patch # User Wuzzy # Date 1479857338 -3600 # Node ID 6f4b96669f9d488cabb0b2a6cfaf418873c7e0b1 # Parent acae870a66b9c9d6d99ba16c2881afcc35d85957 Fix Construction Mode screwing up when initialenergy > maxenergy diff -r acae870a66b9 -r 6f4b96669f9d share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Wed Nov 23 00:17:28 2016 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Wed Nov 23 00:28:58 2016 +0100 @@ -30,6 +30,7 @@ -- -- Possible keys: --- initialenergy: Amount of energy that each team starts with (default: 550) +--- Note: Must be smaller than or equal to maxenergy --- energyperround: Amount of energy that each team gets per round (default: 50) --- maxenergy: Maximum amount of energy each team can hold (default: 1000) @@ -1594,7 +1595,7 @@ SetVisualGearValues(sCirc, 0, 0, 100, 255, 1, 10, 0, 40, 3, 0x00000000) for i = 0, ClansCount-1 do - clanPower[i] = conf_initialEnergy + clanPower[i] = math.min(conf_initialEnergy, conf_maxEnergy) clanLWepIndex[i] = 1 -- for ease of use let's track this stuff clanLUtilIndex[i] = 1 clanLGearIndex[i] = 1