Move "build" cvar pointer check to GameDLLInit function.

This commit is contained in:
Andrey Akhmichin 2020-04-22 14:11:03 +05:00
parent 6cc78b593d
commit 895e7b7503
2 changed files with 4 additions and 4 deletions

View File

@ -17,6 +17,8 @@
#include "util.h" #include "util.h"
#include "game.h" #include "game.h"
BOOL g_fIsXash3D;
cvar_t displaysoundlist = {"displaysoundlist","0"}; cvar_t displaysoundlist = {"displaysoundlist","0"};
// multiplayer server rules // multiplayer server rules
@ -453,6 +455,8 @@ cvar_t sk_player_leg3 = { "sk_player_leg3","1" };
void GameDLLInit( void ) void GameDLLInit( void )
{ {
// Register cvars here: // Register cvars here:
if( CVAR_GET_POINTER( "build" ) )
g_fIsXash3D = TRUE;
g_psv_gravity = CVAR_GET_POINTER( "sv_gravity" ); g_psv_gravity = CVAR_GET_POINTER( "sv_gravity" );
g_psv_aim = CVAR_GET_POINTER( "sv_aim" ); g_psv_aim = CVAR_GET_POINTER( "sv_aim" );

View File

@ -28,7 +28,6 @@
// Holds engine functionality callbacks // Holds engine functionality callbacks
enginefuncs_t g_engfuncs; enginefuncs_t g_engfuncs;
globalvars_t *gpGlobals; globalvars_t *gpGlobals;
BOOL g_fIsXash3D;
#ifdef _WIN32 #ifdef _WIN32
@ -54,7 +53,4 @@ extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t *pengfuncsFromE
{ {
memcpy( &g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t) ); memcpy( &g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t) );
gpGlobals = pGlobals; gpGlobals = pGlobals;
if( CVAR_GET_POINTER( "build" ) )
g_fIsXash3D = TRUE;
} }