Assert on debug builds

This commit is contained in:
OM 2023-06-11 12:41:02 +02:00
parent a46fd50654
commit e28563a7f4

View file

@ -302,11 +302,17 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
static int errorCount;
int currentTime;
#ifdef COM_ERROR_ASSERT
*( int * )0 = 0;
assert( 0 );
#ifdef COM_ERROR_DROP_ASSERT
if (code == ERR_DROP)
{
*(int*)0 = 0;
assert(qfalse);
}
#endif
// Debug builds should stop on this
assert(code != ERR_FATAL);
Cvar_Set( "com_errorCode", va( "%i", code ) );
// when we are running automated scripts, make sure we