diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index 3c7ed88..3f5fbed 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -95,6 +95,7 @@ extern cvar_t *sensitivity; cvar_t *cl_lw = NULL; cvar_t *cl_righthand = nullptr; cvar_t* cl_viewmodel_lag_enabled; +cvar_t* hud_watermark; void ShutdownInput (void); @@ -629,6 +630,7 @@ void CHud :: Init( void ) m_pSpriteList = NULL; CVAR_CREATE("cl_music_enabled", "1", FCVAR_ARCHIVE | FCVAR_CLIENTDLL | FCVAR_USERINFO ); + hud_watermark = CVAR_CREATE("hud_watermark", "1", FCVAR_ARCHIVE); // Version Info command. Runs PrintVersion() which reads info from versioninfo.h gEngfuncs.pfnAddCommand("version_aura", PrintVersion); diff --git a/cl_dll/hud_settings.cpp b/cl_dll/hud_settings.cpp index 775d0f7..cacb9ee 100644 --- a/cl_dll/hud_settings.cpp +++ b/cl_dll/hud_settings.cpp @@ -49,36 +49,40 @@ int CHudSettings::Draw(float time) char str[32]; - sprintf(str, "Aura %s", ag_version); - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); - - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), gamemode, r, g, b); - - sprintf(str, "Time limit: %hhd", time_limit); - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight / 2 * 3), str, r, g, b); - - sprintf(str, "Frag limit: %hhd", frag_limit); - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + extern cvar_t* hud_watermark; + if (hud_watermark->value == 1) + { + sprintf(str, "Aura %s", ag_version); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); - sprintf(str, "Friendly fire: %s", friendly_fire ? "On" : "Off"); - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), gamemode, r, g, b); - sprintf(str, "Weaponstay: %s", weapon_stay ? "On" : "Off"); - gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + sprintf(str, "Time limit: %hhd", time_limit); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight / 2 * 3), str, r, g, b); - if (wallgauss[0]) { - sprintf(str, "Wallgauss: %sx (1)", wallgauss); + sprintf(str, "Frag limit: %hhd", frag_limit); gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); - } - if (headshot[0]) { - sprintf(str, "Headshot: %sx (3)", headshot); + sprintf(str, "Friendly fire: %s", friendly_fire ? "On" : "Off"); gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); - } - if (blast_radius[0]) { - sprintf(str, "Blast radius: %sx (1)", blast_radius); + sprintf(str, "Weaponstay: %s", weapon_stay ? "On" : "Off"); gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + + if (wallgauss[0]) { + sprintf(str, "Wallgauss: %sx (1)", wallgauss); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + } + + if (headshot[0]) { + sprintf(str, "Headshot: %sx (3)", headshot); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + } + + if (blast_radius[0]) { + sprintf(str, "Blast radius: %sx (1)", blast_radius); + gEngfuncs.pfnDrawString(x, (y += gHUD.m_scrinfo.iCharHeight), str, r, g, b); + } } if (match_is_on) { diff --git a/cl_dll/hud_watermark.cpp b/cl_dll/hud_watermark.cpp index 5f344b1..13d545c 100644 --- a/cl_dll/hud_watermark.cpp +++ b/cl_dll/hud_watermark.cpp @@ -67,12 +67,16 @@ int CHudWatermark::Draw(float time) sprintf(displayString, "Half-Life: Zombies Ate My Neighbours Multiplayer %s", zamnhlmpVersion); - gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight, "Aura client build " __DATE__, r, g, b); - gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight * 2, displayString, r, g, b); - gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight * 3, season, r, g, b); + extern cvar_t* hud_watermark; + if (hud_watermark->value == 1) + { + gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight, "Aura client build " __DATE__, r, g, b); + gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight * 2, displayString, r, g, b); + gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight * 3, season, r, g, b); - if (update_is_available) - gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight / 2 * 7, " ", r, g, b); + if (update_is_available) + gEngfuncs.pfnDrawString(ScreenWidth / 20, gHUD.m_scrinfo.iCharHeight / 2 * 7, " ", r, g, b); + } return 0; }