From 9ebab42ec7e40aaa74e61cc032a4a6ed40864dd4 Mon Sep 17 00:00:00 2001 From: pierow Date: Fri, 22 Jan 2021 20:39:28 -0500 Subject: [PATCH] added nsversion --- main/source/cl_dll/input.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/main/source/cl_dll/input.cpp b/main/source/cl_dll/input.cpp index c4e59352..d6d32fb3 100644 --- a/main/source/cl_dll/input.cpp +++ b/main/source/cl_dll/input.cpp @@ -1488,6 +1488,21 @@ void CL_ResetButtonBits( int bits ) } } +void NsVersion(void) +{ + static char theGameVersion[1024]; + + string theGameVersionString; + + theGameVersionString = "v" + MakeStringFromInt(BALANCE_VAR(kGameVersionMajor)) + "." + MakeStringFromInt(BALANCE_VAR(kGameVersionMinor)) + "." + + MakeStringFromInt(BALANCE_VAR(kGameVersionRevision)) + " " + __DATE__ + " " + __TIME__; + + //memset(theGameVersion, 0, 1024); + strcpy(theGameVersion, theGameVersionString.c_str()); + + gEngfuncs.Con_Printf(theGameVersion); +} + /* ============ InitInput @@ -1560,6 +1575,8 @@ void InitInput (void) gEngfuncs.pfnAddCommand("+scrollright", IN_ScrollRightDown); gEngfuncs.pfnAddCommand("-scrollright", IN_ScrollRightUp); + gEngfuncs.pfnAddCommand("nsversion", NsVersion); + lookstrafe = gEngfuncs.pfnRegisterVariable ( "lookstrafe", "0", FCVAR_ARCHIVE ); lookspring = gEngfuncs.pfnRegisterVariable ( "lookspring", "0", FCVAR_ARCHIVE ); cl_anglespeedkey = gEngfuncs.pfnRegisterVariable ( "cl_anglespeedkey", "0.67", 0 );