From 28eb4b15af0784eee41c18087b9ef5d7a6dceb63 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 10 Feb 2021 23:02:34 +0100 Subject: [PATCH] Remove gfx_show_warnings --- src/engine/shared/config_variables.h | 1 - src/game/client/gameclient.cpp | 21 +++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index a806f5086..0719dd4a5 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -123,7 +123,6 @@ MACRO_CONFIG_INT(GfxTextOverlay, gfx_text_overlay, 10, 1, 100, CFGFLAG_SAVE | CF MACRO_CONFIG_INT(GfxAsyncRenderOld, gfx_asyncrender_old, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Do rendering async from the the update") MACRO_CONFIG_INT(GfxTuneOverlay, gfx_tune_overlay, 20, 1, 100, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Stop rendering text overlay in tuning zone in editor: high value = less details = more speed") MACRO_CONFIG_INT(GfxQuadAsTriangle, gfx_quad_as_triangle, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Render quads as triangles (fixes quad coloring on some GPUs)") -MACRO_CONFIG_INT(GfxShowWarnings, gfx_show_warnings, 1, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Render gfx warnings to screen") MACRO_CONFIG_INT(InpMousesens, inp_mousesens, 200, 1, 100000, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Mouse sensitivity") MACRO_CONFIG_INT(InpMouseOld, inp_mouseold, 0, 0, 1, CFGFLAG_SAVE | CFGFLAG_CLIENT, "Use old mouse mode (warp mouse instead of raw input)") diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index f750b4ba7..9c1ad521c 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -653,25 +653,10 @@ void CGameClient::OnRender() // update the local character and spectate position UpdatePositions(); - // display gfx warnings - if(g_Config.m_GfxShowWarnings == 1) + // display gfx & client warnings + for(SWarning *pWarning : {Graphics()->GetCurWarning(), Client()->GetCurWarning()}) { - SWarning *pWarning = Graphics()->GetCurWarning(); - if(pWarning != NULL) - { - if(m_pMenus->CanDisplayWarning()) - { - m_pMenus->PopupWarning(Localize("Warning"), pWarning->m_aWarningMsg, "Ok", 10000000); - pWarning->m_WasShown = true; - } - } - } - - // display client warnings - SWarning *pWarning = Client()->GetCurWarning(); - if(pWarning != NULL) - { - if(m_pMenus->CanDisplayWarning()) + if(pWarning != NULL && m_pMenus->CanDisplayWarning()) { m_pMenus->PopupWarning(Localize("Warning"), pWarning->m_aWarningMsg, "Ok", 10000000); pWarning->m_WasShown = true;