diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-06-29 12:32:32 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-06-29 12:32:32 +0000 |
commit | e826e5f176f21cd18b3bbc22887a266835ada57c (patch) | |
tree | d25a84a84f9168b16a77fe4ed8b169c9611bbb02 /source/sv_game.c | |
parent | 491f1c100e860c45a5d2aa358d58f777cd1cf895 (diff) |
Added client and server side support for 32-bit solids.
New R1Q2 and Q2PRO minor protocol versions, 1905 and 1014.
Use environment variables for game and server features negotiation.
Relax restrictions on quake paths when searching inside pak files.
Made OSS subsystem cvar names consistent with core sound system conventions.
Misc latched cvar handling changes.
Diffstat (limited to 'source/sv_game.c')
-rw-r--r-- | source/sv_game.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/source/sv_game.c b/source/sv_game.c index 58391d9..5a24858 100644 --- a/source/sv_game.c +++ b/source/sv_game.c @@ -763,10 +763,7 @@ void SV_ShutdownGameProgs (void) { Sys_FreeLibrary( game_library ); game_library = NULL; } - if( g_features ) { - Cvar_SetByVar( g_features, NULL, CVAR_SET_DIRECT ); - g_features->flags = CVAR_VOLATILE; - } + Q_setenv( "QUAKE2_GAME_FEATURES", NULL ); } /* @@ -780,6 +777,7 @@ void SV_InitGameProgs ( void ) { game_import_t import; char path[MAX_OSPATH]; game_export_t *(*entry)( game_import_t * ) = NULL; + char *s; // unload anything we have now SV_ShutdownGameProgs (); @@ -830,15 +828,15 @@ void SV_InitGameProgs ( void ) { import.BoxEdicts = SV_AreaEdicts; #ifdef _WIN32 #ifdef __GNUC__ - import.trace = ( sv_trace_t )SV_Trace_Old; + import.trace = ( sv_trace_t )SV_Trace; #else - import.trace = SV_Trace; + import.trace = SV_Trace_Native; #endif #else /* _WIN32 */ if( sv_oldgame_hack->integer ) { - import.trace = ( sv_trace_t )SV_Trace_Old; + import.trace = ( sv_trace_t )SV_Trace; } else { - import.trace = SV_Trace; + import.trace = SV_Trace_Native; } #endif /* !_WIN32 */ import.pointcontents = SV_PointContents; @@ -891,9 +889,18 @@ void SV_InitGameProgs ( void ) { ge->apiversion, GAME_API_VERSION); } + // export server features + Q_setenv( "QUAKE2_SERVER_FEATURES", va( "%d", GMF_CLIENTNUM|GMF_MVDSPEC ) ); + // initialize ge->Init (); + // get game features + s = getenv( "QUAKE2_GAME_FEATURES" ); + if( s && *s ) { + svs.gameFeatures = atoi( s ); + } + Sys_FixFPCW(); } |