engine: get rid of host.crashed field, as it's a complete duplicate of host.status

This commit is contained in:
Alibek Omarov
2025-04-21 16:59:44 +03:00
parent 0e54200f34
commit c564cc96c7
8 changed files with 7 additions and 12 deletions
+1 -2
View File
@@ -74,13 +74,12 @@ void Sys_Crash( int signal, siginfo_t *si, void *context )
#if !XASH_DEDICATED
IN_SetMouseGrab( false );
#endif
host.crashed = true;
host.status = HOST_CRASHED;
Platform_MessageBox( "Xash Error", message, false );
// log saved, now we can try to save configs and close log correctly, it may crash
if( host.type == HOST_NORMAL )
CL_Crashed();
host.status = HOST_CRASHED;
Sys_Quit( "crashed" );
}
+1 -2
View File
@@ -167,13 +167,12 @@ void Sys_CrashLibbacktrace( int signal, siginfo_t *si, void *context )
#if !XASH_DEDICATED
IN_SetMouseGrab( false );
#endif
host.crashed = true;
host.status = HOST_CRASHED;
Platform_MessageBox( "Xash Error", message, false );
// log saved, now we can try to save configs and close log correctly, it may crash
if( host.type == HOST_NORMAL )
CL_Crashed();
host.status = HOST_CRASHED;
Sys_Quit( "crashed" );
}
+1 -2
View File
@@ -196,13 +196,12 @@ void Sys_Crash( int signal, siginfo_t *si, void *context )
#if !XASH_DEDICATED
IN_SetMouseGrab( false );
#endif
host.crashed = true;
host.status = HOST_CRASHED;
Platform_MessageBox( "Xash Error", message, false );
// log saved, now we can try to save configs and close log correctly, it may crash
if( host.type == HOST_NORMAL )
CL_Crashed();
host.status = HOST_CRASHED;
Sys_Quit( "crashed" );
}
+1 -1
View File
@@ -549,7 +549,7 @@ void Platform_RunEvents( void )
{
SDL_Event event;
while( !host.crashed && !host.shutdown_issued && SDL_PollEvent( &event ) )
while( host.status != HOST_CRASHED && !host.shutdown_issued && SDL_PollEvent( &event ) )
SDLash_EventHandler( &event );
#if XASH_PSVITA
+1 -2
View File
@@ -270,7 +270,7 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
if( host.status != HOST_CRASHED )
{
// check to avoid recursive call
host.crashed = true;
host.status = HOST_CRASHED;
#if !XASH_DEDICATED
IN_SetMouseGrab( false );
@@ -302,7 +302,6 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
if( host.type == HOST_NORMAL )
CL_Crashed(); // tell client about crash
else host.status = HOST_CRASHED;
if( host_developer.value <= 0 )
{