--- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Thu Nov 29 20:09:01 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Thu Nov 29 20:37:40 2018 +0100
@@ -286,12 +286,14 @@
end
function RenderClanPower()
+ DrawClanPowerTag()
+end
+
+function UpdateTeamLabels()
for i=0, TeamsCount-1 do
local name = GetTeamName(i)
SetTeamLabel(name, clanPower[GetTeamClan(name)])
end
-
- DrawClanPowerTag()
end
function DrawClanPowerTag()
@@ -1086,6 +1088,7 @@
-- Pay the price
clanPower[GetHogClan(CurrentHedgehog)] = clanPower[GetHogClan(CurrentHedgehog)] - placedExpense
RenderClanPower()
+ UpdateTeamLabels()
if cat[cIndex] == "Girder Placement Mode" or cat[cIndex] == "Rubber Placement Mode" then
PlaySound(sndPlaced)
end
@@ -1346,6 +1349,10 @@
HandleStructures()
+ if GameTime % 100 == 0 then
+ UpdateTeamLabels()
+ end
+
if CurrentHedgehog ~= nil then
if wallsVisible == true then
@@ -1834,6 +1841,7 @@
clanCratesSpawned[clan] = 0
RenderClanPower()
+ UpdateTeamLabels()
end
function onEndTurn()