# HG changeset patch # User Wuzzy # Date 1558096692 -7200 # Node ID c52aa7ba2e167c25fc576333d18b5e3faafa37fa # Parent 5188ecbf726f778a4939ff0e5390762b5ae39a19 Control (style): Adjust score limit according to clans count instead of teams count diff -r 5188ecbf726f -r c52aa7ba2e16 share/hedgewars/Data/Maps/Control/map.lua --- a/share/hedgewars/Data/Maps/Control/map.lua Fri May 17 14:15:40 2019 +0200 +++ b/share/hedgewars/Data/Maps/Control/map.lua Fri May 17 14:38:12 2019 +0200 @@ -53,7 +53,6 @@ local numhhs = 0 -- store number of hedgehogs local hhs = {} -- store hedgehog gears -local numTeams -- store the number of teams in the game local teamNameArr = {} -- store the list of teams local teamClan = {} local teamSize = {} -- store how many hogs per team @@ -205,7 +204,7 @@ teamIndex[i] = 0 teamScore[i] = 0 end - numTeams = 0 + local numTeams = 0 for i = 0, (numhhs-1) do @@ -236,7 +235,7 @@ end -- find out how many hogs per team, and the index of the first hog in hhs - for i = 0, (numTeams-1) do + for i = 0, TeamsCount-1 do SetTeamLabel(GetTeamName(i), "0") for z = 0, (numhhs-1) do if GetHogTeamName(hhs[z]) == teamNameArr[i] then @@ -317,7 +316,7 @@ --new improved placement schematics aw yeah RebuildTeamInfo() - for i = 0, (numTeams-1) do + for i = 0, ClansCount - 1 do pointLimit = pointLimit - 25 end @@ -395,7 +394,7 @@ if gameWon == false then - for i = 0, (numTeams-1) do + for i = 0, TeamsCount - 1 do if teamScore[i] >= pointLimit then --150 gameWon = true winnerClan = i @@ -415,7 +414,7 @@ -- Rankings local teamList = {} - for i=0, TeamsCount-1 do + for i=0, TeamsCount - 1 do local name = GetTeamName(i) local clan = GetTeamClan(name) table.insert(teamList, { score = teamScore[teamClan[i]], name = name, clan = clan })