mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-09 18:31:53 +00:00
Set audio volumes before entering main loop
Fixes an issue where the volumes would be at max before the first wipe finishes. This is because S_UpdateSounds isn't called during wipes.
This commit is contained in:
parent
8ff2e13c7d
commit
2c0642b3d1
1 changed files with 11 additions and 5 deletions
|
|
@ -894,6 +894,12 @@ void D_SRB2Loop(void)
|
||||||
because I_FinishUpdate was called afterward
|
because I_FinishUpdate was called afterward
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Make sure audio volume is initialized since S_UpdateSounds won't be called during the
|
||||||
|
// initial wipe.
|
||||||
|
S_SetMasterVolume();
|
||||||
|
S_SetMusicVolume();
|
||||||
|
S_SetSfxVolume();
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
// capbudget is the minimum precise_t duration of a single loop iteration
|
// capbudget is the minimum precise_t duration of a single loop iteration
|
||||||
|
|
@ -1800,15 +1806,15 @@ void D_SRB2Main(void)
|
||||||
S_RegisterSoundStuff();
|
S_RegisterSoundStuff();
|
||||||
|
|
||||||
I_RegisterSysCommands();
|
I_RegisterSysCommands();
|
||||||
|
|
||||||
CON_SetLoadingProgress(LOADED_HUINIT);
|
CON_SetLoadingProgress(LOADED_HUINIT);
|
||||||
|
|
||||||
CONS_Printf("W_InitMultipleFiles(): Adding external PWADs.\n");
|
CONS_Printf("W_InitMultipleFiles(): Adding external PWADs.\n");
|
||||||
|
|
||||||
// HACK: Refer to https://git.do.srb2.org/KartKrew/RingRacers/-/merge_requests/29#note_61574
|
// HACK: Refer to https://git.do.srb2.org/KartKrew/RingRacers/-/merge_requests/29#note_61574
|
||||||
partadd_earliestfile = numwadfiles;
|
partadd_earliestfile = numwadfiles;
|
||||||
W_InitMultipleFiles(startuppwads, true);
|
W_InitMultipleFiles(startuppwads, true);
|
||||||
|
|
||||||
// Only search for pwad maps and reload graphics if we actually have a pwad added
|
// Only search for pwad maps and reload graphics if we actually have a pwad added
|
||||||
if (startuppwads[0] != NULL)
|
if (startuppwads[0] != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -1818,7 +1824,7 @@ void D_SRB2Main(void)
|
||||||
P_InitMapData();
|
P_InitMapData();
|
||||||
HU_LoadGraphics();
|
HU_LoadGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
D_CleanFile(startuppwads);
|
D_CleanFile(startuppwads);
|
||||||
partadd_earliestfile = UINT16_MAX;
|
partadd_earliestfile = UINT16_MAX;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue