Skip to content

Commit

Permalink
Use mp_pause_match before loading round backup
Browse files Browse the repository at this point in the history
In CS2 `mp_backup_restore_load_autopause` does not seem to work,
but executing `mp_pause_match` before loading the backup
pauses the match after the round has been restored.
  • Loading branch information
ovee committed Oct 9, 2023
1 parent 5261d63 commit a993ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export const getRoundBackups = async (match: Match, count: number = 5) => {
};

export const loadRoundBackup = async (match: Match, file: string) => {
await execRcon(match, 'mp_backup_restore_load_autopause 1');
await execRcon(match, 'mp_pause_match');
const response = await execRcon(match, `mp_backup_restore_load_file "${file}"`);
if (response.includes('Failed to load file:')) {
match.log(`Error loading round backup: ${response}`);
Expand Down

0 comments on commit a993ad2

Please sign in to comment.