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

Fixed crash & round number

This commit is contained in:
Hubert Walczak 2023-09-29 10:42:00 +02:00
parent 25cd6b7197
commit 4380d190fd
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "lexogrine_cs2_hud",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "./",
"private": true,
"dependencies": {
@ -11,7 +11,7 @@
"@types/react-dom": "17.0.11",
"@types/simple-peer": "^9.11.3",
"buffer": "^6.0.3",
"csgogsi-socket": "^2.7.1",
"csgogsi-socket": "^2.7.2",
"query-string": "^6.12.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",

View File

@ -159,10 +159,10 @@ export default class TeamBox extends React.Component<IProps, IState> {
getRoundLabel = () => {
const { map } = this.props;
const round = map.round + 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)`;
}