Skip to content

Commit

Permalink
fix(match2): Prevent premature return in match legacy on AoE (#5213)
Browse files Browse the repository at this point in the history
fix(match2) Prevent premature return in match legacy
  • Loading branch information
mbergen authored Dec 16, 2024
1 parent 0e2d9bd commit b6f09ad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions components/match2/wikis/ageofempires/match_legacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ function MatchLegacy.storeGames(match, match2)
Array.forEach(opponents, function(opponent, opponentIndex)
-- opponent.players can have gaps
for _, player in pairs(opponent.players) do
if Table.isEmpty(player) then return end
local prefix = 'o' .. opponentIndex .. 'p' .. player.index
game.extradata[prefix] = player.pageName
game.extradata[prefix .. 'faction'] = player.civ
game.extradata[prefix .. 'name'] = player.displayname
game.extradata[prefix .. 'flag'] = player.flag
if Table.isNotEmpty(player) then
local prefix = 'o' .. opponentIndex .. 'p' .. player.index
game.extradata[prefix] = player.pageName
game.extradata[prefix .. 'faction'] = player.civ
game.extradata[prefix .. 'name'] = player.displayname
game.extradata[prefix .. 'flag'] = player.flag
end
end
end)
elseif game.mode == '1v1' then
Expand Down

0 comments on commit b6f09ad

Please sign in to comment.