Aufwärmphase vor mp_warmup_end als beendet markieren
CS2 sendet Match_Start sofort nach mp_warmup_end, oft bevor die RCON-Antwort da ist. Bei fehlgeschlagenem Befehl wird die Markierung zurückgenommen.
This commit is contained in:
1 parent
263c7e7b7c
commit
ea2207899f
2 files changed
+5
-3
No files matched your search
@@ -449,12 +449,12 @@ export class MatchService extends EventEmitter {
|
||||
}
|
||||
|
||||
/** Organisator hat die Aufwärmphase beendet: ab dem nächsten Match_Start wird gezählt. */
|
||||
markWarmupEnded(matchId) {
|
||||
markWarmupEnded(matchId, ended = true) {
|
||||
const match = this.getMatch(matchId);
|
||||
const row = this.seriesMaps(matchId).find((m) => m.number === match.current_map_number);
|
||||
if (!row) return;
|
||||
const state = row.live ? JSON.parse(row.live) : initialLiveState({ map: row.map, ctTeam: row.ct_team });
|
||||
state.warmupEnded = true;
|
||||
state.warmupEnded = ended;
|
||||
this.db
|
||||
.prepare('UPDATE series_maps SET live = ? WHERE match_id = ? AND number = ?')
|
||||
.run(JSON.stringify(state), matchId, row.number);
|
||||
|
||||
Reference in new issue
Block a user