mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 03:51:50 +00:00
Play a goofy sound when I_Erroring
Reorders shutdown in I_Error a little bit so the message box displays before I_ShutdownSound and SDL_Quit (so the sound can continue playing while the message box is open). This should not have any other effects and I_ShutdownGraphics is still done beforehand, which closes the main game window.
This commit is contained in:
parent
c6f891f545
commit
da004414a3
1 changed files with 13 additions and 4 deletions
|
|
@ -1633,6 +1633,12 @@ void I_Error(const char *error, ...)
|
|||
exit(-1); // recursive errors detected
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// This makes crashes funnier by stimulating the funnicampus of the brain
|
||||
S_StopSounds();
|
||||
S_StartSound(NULL, sfx_etexpl);
|
||||
}
|
||||
|
||||
shutdowning = true;
|
||||
|
||||
|
|
@ -1661,13 +1667,10 @@ void I_Error(const char *error, ...)
|
|||
D_QuitNetGame();
|
||||
CL_AbortDownloadResume();
|
||||
M_FreePlayerSetupColors();
|
||||
|
||||
I_ShutdownMusic();
|
||||
I_ShutdownSound();
|
||||
// use this for 1.28 19990220 by Kin
|
||||
I_ShutdownGraphics();
|
||||
I_ShutdownInput();
|
||||
I_ShutdownSystem();
|
||||
SDL_Quit();
|
||||
|
||||
// Implement message box with SDL_ShowSimpleMessageBox,
|
||||
// which should fail gracefully if it can't put a message box up
|
||||
|
|
@ -1677,6 +1680,12 @@ void I_Error(const char *error, ...)
|
|||
"Dr. Robotnik's Ring Racers "VERSIONSTRING" Error",
|
||||
buffer, NULL);
|
||||
|
||||
// We wait until now to do this so the funny sound can be heard
|
||||
I_ShutdownSound();
|
||||
// use this for 1.28 19990220 by Kin
|
||||
I_ShutdownSystem();
|
||||
SDL_Quit();
|
||||
|
||||
// Note that SDL_ShowSimpleMessageBox does *not* require SDL to be
|
||||
// initialized at the time, so calling it after SDL_Quit() is
|
||||
// perfectly okay! In addition, we do this on purpose so the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue