2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-25 03:09:24 +01:00

client: include vcs info to the build and register variables

This commit is contained in:
Alibek Omarov 2024-04-05 19:48:03 +03:00 committed by Andrey Akhmichin
parent 73590dd0a3
commit f6988f4e49
2 changed files with 7 additions and 1 deletions

View File

@ -123,7 +123,9 @@ set (CLDLL_SOURCES
train.cpp
tri.cpp
util.cpp
view.cpp)
view.cpp
../game_shared/vcs_info.cpp
)
if (USE_VGUI)
list(APPEND CLDLL_SOURCES

View File

@ -42,6 +42,7 @@ extern "C"
}
#include <string.h>
#include "vcs_info.h"
cl_enginefunc_t gEngfuncs;
CHud gHUD;
@ -171,6 +172,9 @@ int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion )
EV_HookEvents();
gEngfuncs.pfnRegisterVariable( "cl_game_build_commit", g_VCSInfo_Commit, 0 );
gEngfuncs.pfnRegisterVariable( "cl_game_build_branch", g_VCSInfo_Branch, 0 );
return 1;
}