server: include vcs info to the build and register variables

This commit is contained in:
Alibek Omarov 2024-04-05 19:47:53 +03:00 committed by Andrey Akhmichin
parent b6cbd65766
commit 73590dd0a3
3 changed files with 10 additions and 1 deletions

View File

@ -148,6 +148,7 @@ set (SVDLL_SOURCES
../pm_shared/pm_debug.c
../pm_shared/pm_math.c
../pm_shared/pm_shared.c
../game_shared/vcs_info.cpp
)
include_directories (. wpn_shared ../common ../engine ../pm_shared ../game_shared ../public)

View File

@ -16,6 +16,10 @@
#include "eiface.h"
#include "util.h"
#include "game.h"
#include "vcs_info.h"
static cvar_t build_commit = { "sv_game_build_commit", g_VCSInfo_Commit };
static cvar_t build_branch = { "sv_game_build_branch", g_VCSInfo_Commit };
cvar_t displaysoundlist = {"displaysoundlist","0"};
@ -470,6 +474,9 @@ void GameDLLInit( void )
g_enable_cheats = CVAR_GET_POINTER( "sv_cheats" );
CVAR_REGISTER( &build_commit );
CVAR_REGISTER( &build_branch );
CVAR_REGISTER( &displaysoundlist );
CVAR_REGISTER( &allow_spectators );

View File

@ -24,10 +24,11 @@ def build(bld):
source = bld.path.ant_glob('**/*.cpp', excl=excluded_files)
source += bld.path.parent.ant_glob('pm_shared/*.c')
source += ['../game_shared/vcs_info.cpp']
defines = []
if bld.env.USE_VOICEMGR:
source += bld.path.parent.ant_glob('game_shared/voice_gamemgr.cpp')
source += ['../game_shared/voice_gamemgr.cpp']
else:
defines += ['NO_VOICEGAMEMGR']