mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 06:32:32 +00:00
Fix values of miscellaneous summary tab shifted.
Introduced in 57d0e7bd96. Caused by incomplete filtering.
Differential revision: D3340
Fixes: #5946
Reviewed by: @wraitii
Tested by: @Langbart
Comment by: @toonijn
Suggestions from: @Imarok
This was SVN commit r24754.
This commit is contained in:
@@ -30,8 +30,10 @@ function getPlayerValuesPerTeam(team, index, type, counters, headings)
|
|||||||
return g_Teams[team].map(player => fn(g_GameData.sim.playerStates[player], index, type));
|
return g_Teams[team].map(player => fn(g_GameData.sim.playerStates[player], index, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCountersPlayer(playerState, counters, headings, idGUI, index)
|
function updateCountersPlayer(playerState, allCounters, allHeadings, idGUI, index)
|
||||||
{
|
{
|
||||||
|
let counters = allCounters.filter(counter => !counter.hideInSummary);
|
||||||
|
let headings = allHeadings.filter(heading => !heading.hideInSummary);
|
||||||
for (let n in counters)
|
for (let n in counters)
|
||||||
{
|
{
|
||||||
let fn = counters[n].fn;
|
let fn = counters[n].fn;
|
||||||
@@ -40,8 +42,10 @@ function updateCountersPlayer(playerState, counters, headings, idGUI, index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCountersTeam(teamFn, counters, headings, index)
|
function updateCountersTeam(teamFn, allCounters, allHeadings, index)
|
||||||
{
|
{
|
||||||
|
let counters = allCounters.filter(counter => !counter.hideInSummary);
|
||||||
|
let headings = allHeadings.filter(heading => !heading.hideInSummary);
|
||||||
for (let team in g_Teams)
|
for (let team in g_Teams)
|
||||||
{
|
{
|
||||||
if (team == -1)
|
if (team == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user