diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index d155a5f93..b0598a05b 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -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 diff --git a/src/sounds.c b/src/sounds.c index d3ad7c641..ebf43289a 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1182,6 +1182,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"clawk2", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // SF_X8AWAYSOUND {"monch", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"etexpl", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Game crash"}, // SRB2Kart - Engine sounds // Engine class A diff --git a/src/sounds.h b/src/sounds.h index fee219a7e..427731ec5 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -1251,6 +1251,7 @@ typedef enum sfx_clawk2, sfx_monch, + sfx_etexpl, // Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy... // Engine class A - Low Speed, Low Weight