diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index f6ecbb9f..9c0819cb 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -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 diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 55516b84..bedf5c6c 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -42,6 +42,7 @@ extern "C" } #include +#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; }