|
|
|
@ -249,7 +249,7 @@ app.get('/contest/:id/ranklist', async (req, res) => {
|
|
|
|
|
|
|
|
|
|
/*** XXX: Clumsy duplication, see ContestRanklist::updatePlayer() ***/ |
|
|
|
|
if (contest.type === 'noi' || contest.type === 'ioi') { |
|
|
|
|
let multiplier = contest.ranklist.ranking_params[i] || 1.0; |
|
|
|
|
let multiplier = (contest.ranklist.ranking_params || {})[i] || 1.0; |
|
|
|
|
player.score_details[i].weighted_score = player.score_details[i].score == null ? null : Math.round(player.score_details[i].score * multiplier); |
|
|
|
|
player.score += player.score_details[i].weighted_score; |
|
|
|
|
} |
|
|
|
|