Skip to content

Commit

Permalink
fix placement merge in pdt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Dec 10, 2024
1 parent c05158c commit 34c25b3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions components/match2/commons/match_summary_ffa.lua
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,21 @@ function MatchSummaryFfa.createScoringData(match)
local newScores = {}
local lastData = {}
for placement, placementData in ipairs(scoreSettings or {}) do
if Table.deepEquals(lastData, placementData) then
local currentData = {
killPoints = placementData.killPoints,
placementPoints = placementData.placementPoints,
}
if Table.deepEquals(lastData, currentData) then
newScores[#newScores].rangeEnd = newScores[#newScores].rangeEnd + 1
else
table.insert(newScores, {
rangeStart = placement,
rangeEnd = placement,
killScore = placementData.killPoints,
placementScore = placementData.placementPoints,
killScore = currentData.killPoints,
placementScore = currentData.placementPoints,
})
end
lastData = placementData
lastData = currentData
end
return newScores
end
Expand Down

0 comments on commit 34c25b3

Please sign in to comment.