From 42ecf1a0332d0fae4ee4e4744b7776ba016cbd61 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 27 May 2020 17:22:21 +0200 Subject: [PATCH] Fix g_fullbrightitems that requires a game restart to apply changes when it's toggle off --- qcsrc/common/t_items.qc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index e1d9d583bf..20ffe812e6 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -185,14 +185,16 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) Item_SetAlpha(this); if(this.ItemStatus & ITS_ALLOWFB) - this.effects |= EF_FULLBRIGHT; + this.effects |= EF_FULLBRIGHT; + else + this.effects &= ~EF_FULLBRIGHT; if(this.ItemStatus & ITS_GLOW) { if(this.ItemStatus & ITS_AVAILABLE) this.effects |= (EF_ADDITIVE | EF_FULLBRIGHT); else - this.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT); + this.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT); } } @@ -444,9 +446,10 @@ void Item_Show(entity e, int mode) if (autocvar_g_nodepthtestitems) e.effects |= EF_NODEPTHTEST; - if (autocvar_g_fullbrightitems) e.ItemStatus |= ITS_ALLOWFB; + else + e.ItemStatus &= ~ITS_ALLOWFB; if (autocvar_sv_simple_items) e.ItemStatus |= ITS_ALLOWSI; -- 2.39.2