Staffsync: more pleasant sound

This commit is contained in:
Antonio Martinez 2025-08-19 22:05:31 -04:00
parent 7b39fc4b7e
commit 6337e1d40f
2 changed files with 22 additions and 1 deletions

View file

@ -6808,6 +6808,10 @@ static void Command_Staffsync(void)
mapheader = mapheaderinfo[staffsync_map];
// Test exit
if (false && staffsync_done == 9)
mapheader = NULL;
// Start of the run, init progress and report vars
if (staffsync_map == 0 && staffsync_ghost == 0)
{
@ -6820,6 +6824,10 @@ static void Command_Staffsync(void)
if (mapheaderinfo[i] != NULL)
staffsync_total += mapheaderinfo[i]->ghostCount;
}
soundtest.shuffle = true;
S_UpdateSoundTestDef(false, false, true);
S_SoundTestPlay();
}
// The current configuration corresponds to a valid staff ghost, play it
@ -6835,6 +6843,12 @@ static void Command_Staffsync(void)
staffsync_ghost++;
staffsync_done++;
if (staffsync_done % 50 == 0)
{
S_UpdateSoundTestDef(false, true, true);
S_SoundTestPlay();
}
}
// We've exhausted map headers, report
@ -6880,6 +6894,12 @@ static void Command_Staffsync(void)
staffsync_ghost = 0;
staffsync_map = 0;
staffsync = false;
S_SoundTestTogglePause();
S_StartSound(NULL, sfx_tmxsuc);
S_StartSound(NULL, sfx_cftbl2);
CONS_Printf("%d / %d ghosts desync.\n", staffsync_failed, staffsync_done);
return;
}

View file

@ -262,7 +262,8 @@ boolean S_SoundDisabled(void)
return (
sound_disabled ||
( window_notinfocus && ! (cv_bgaudio.value & 2) ) ||
(g_fast_forward > 0)
(g_fast_forward > 0) ||
staffsync
);
}