mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 09:56:22 +01:00
game_launch: fix gamedir pointer being lost
This commit is contained in:
parent
5524aaae1e
commit
8eec5389fe
@ -138,7 +138,6 @@ static void Sys_ChangeGame( const char *progname )
|
||||
{
|
||||
if( !progname || !progname[0] )
|
||||
Xash_Error( "Sys_ChangeGame: NULL gamedir" );
|
||||
|
||||
#if USE_EXECVE_FOR_CHANGE_GAME
|
||||
#if XASH_WIN32
|
||||
_putenv_s( E_GAME, progname );
|
||||
@ -157,8 +156,9 @@ static void Sys_ChangeGame( const char *progname )
|
||||
if( Xash_Shutdown == NULL )
|
||||
Xash_Error( "Sys_ChangeGame: missed 'Host_Shutdown' export\n" );
|
||||
|
||||
Sys_UnloadEngine();
|
||||
strncpy( szGameDir, progname, sizeof( szGameDir ) - 1 );
|
||||
|
||||
Sys_UnloadEngine();
|
||||
Sys_LoadEngine ();
|
||||
Xash_Main( szArgc, szArgv, szGameDir, 1, Sys_ChangeGame );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user