Merge branch 'the-funny-i-error' into 'master'

The funny I_Error

See merge request KartKrew/Kart!1121
This commit is contained in:
James R 2023-04-02 07:27:38 +00:00
commit 153a8b6da6
3 changed files with 15 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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