diff --git a/src/d_main.c b/src/d_main.c index c0b2ed383..d6a097607 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1181,6 +1181,13 @@ static void Command_assert(void) #endif } +#ifdef DEVELOP +static void Command_crash(void) +{ + I_Error("The game crashed on PURPOSE, because of the 'crash' command. (This is only enabled in DEVELOP builds.)"); +} +#endif + // // D_SRB2Main // @@ -1373,6 +1380,9 @@ void D_SRB2Main(void) COM_Init(); COM_AddCommand("assert", Command_assert); +#ifdef DEVELOP + COM_AddCommand("crash", Command_crash); +#endif #ifndef TESTERS // add any files specified on the command line with -file wadfile diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 352313071..9362a540b 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1891,8 +1891,8 @@ void I_Error(const char *error, ...) W_Shutdown(); -#if defined (PARANOIA) && defined (__CYGWIN__) - *(INT32 *)2 = 4; //Alam: Debug! +#if defined (PARANOIA) || defined (DEVELOP) + *(INT32 *)0 = 4; //Alam: Debug! #endif exit(-1);