wscript: allow to setup engine default gamedir during configure

This commit is contained in:
Alibek Omarov
2022-09-11 02:12:44 +03:00
parent 686a966ff7
commit f571a41cf3
3 changed files with 14 additions and 4 deletions
+4 -2
View File
@@ -35,7 +35,9 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
#endif
#define E_GAME "XASH3D_GAME" // default env dir to start from
#define GAME_PATH "valve" // default dir to start from
#ifndef XASH_GAMEDIR
#define XASH_GAMEDIR "valve"
#endif
static char szGameDir[128]; // safe place to keep gamedir
static int szArgc;
@@ -56,7 +58,7 @@ _inline int Sys_Start( void )
const char *game = getenv( E_GAME );
if( !game )
game = GAME_PATH;
game = XASH_GAMEDIR;
Q_strncpy( szGameDir, game, sizeof( szGameDir ));
#if XASH_EMSCRIPTEN