1
0
mirror of https://github.com/lexogrine/cs2-react-hud.git synced 2025-12-10 03:52:48 +01:00

Merge pull request #4 from borzaka/patch-2

Fix round number (again)
This commit is contained in:
Hubert Walczak 2024-01-26 13:57:38 +01:00 committed by GitHub
commit abe80584fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,10 +35,10 @@ export interface Timer {
}
const getRoundLabel = (mapRound: number) => {
const round = mapRound + 1;
if (round <= 30) {
return `Round ${round}/30`;
if (round <= 24) {
return `Round ${round}/24`;
}
const additionalRounds = round - 30;
const additionalRounds = round - 24;
const OT = Math.ceil(additionalRounds/6);
return `OT ${OT} (${additionalRounds - (OT - 1)*6}/6)`;
}