From bcfabbe802bfbfc8aeddd3ba1544da71ffb7693d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 28 Dec 2023 22:42:12 +0300 Subject: [PATCH] engine: do not save configs when we closing because of the errors --- engine/common/host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/common/host.c b/engine/common/host.c index c19f5906..e8050fe7 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1342,6 +1342,8 @@ Host_Shutdown */ void EXPORT Host_Shutdown( void ) { + qboolean error = host.status == HOST_ERR_FATAL; + if( host.shutdown_issued ) return; host.shutdown_issued = true; @@ -1349,7 +1351,7 @@ void EXPORT Host_Shutdown( void ) if( !host.change_game ) Q_strncpy( host.finalmsg, "Server shutdown", sizeof( host.finalmsg )); #if !XASH_DEDICATED - if( host.type == HOST_NORMAL && host.status != HOST_ERR_FATAL ) + if( host.type == HOST_NORMAL && !error ) Host_WriteConfig(); #endif