From e827c51e4b06cccbb7e0b0c5addcb310f8808002 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Fri, 8 Apr 2022 18:15:18 -0700 Subject: [PATCH] Client: Make sure glow effects are rendered after other entities and camera manipulation. --- src/client/defs.h | 2 ++ src/client/entry.qc | 1 + src/gs-entbase/client/env_glow.qc | 2 +- src/gs-entbase/shared/NSMonster.qc | 4 ++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/defs.h b/src/client/defs.h index 4cc2894e..4a2b440d 100644 --- a/src/client/defs.h +++ b/src/client/defs.h @@ -34,6 +34,8 @@ #define PRINT_HIGH 2 #define PRINT_CHAT 3 +const float MASK_GLOWS = 16; + /* fonts */ font_s FONT_16; font_s FONT_20; diff --git a/src/client/entry.qc b/src/client/entry.qc index 2b7dd85f..10c4e03a 100644 --- a/src/client/entry.qc +++ b/src/client/entry.qc @@ -344,6 +344,7 @@ CSQC_UpdateView(float w, float h, float focus) } #endif + addentities(MASK_GLOWS); setproperty(VF_DRAWWORLD, 1); SkyCamera_Setup(getproperty(VF_ORIGIN)); diff --git a/src/gs-entbase/client/env_glow.qc b/src/gs-entbase/client/env_glow.qc index d01b00fa..a75599e9 100644 --- a/src/gs-entbase/client/env_glow.qc +++ b/src/gs-entbase/client/env_glow.qc @@ -208,7 +208,7 @@ env_glow::env_glow(void) m_flScale = 1.0f; m_flMaxAlpha = 1.0f; m_vecColor = [1,1,1]; - drawmask = MASK_ENGINE; + drawmask = MASK_GLOWS; setsize(this, [0,0,0], [0,0,0]); effects &= ~EF_NOSHADOW; Init(); diff --git a/src/gs-entbase/shared/NSMonster.qc b/src/gs-entbase/shared/NSMonster.qc index eba8372d..baab8ac7 100644 --- a/src/gs-entbase/shared/NSMonster.qc +++ b/src/gs-entbase/shared/NSMonster.qc @@ -543,6 +543,8 @@ NSMonster::NewRoute(vector destination) } } +const int CONTENTBITS_MONSTER = CONTENTBIT_SOLID|0x00000002i|CONTENTBIT_BODY|CONTENTBIT_MONSTERCLIP; + void NSMonster::Physics(void) { @@ -564,6 +566,8 @@ NSMonster::Physics(void) CheckRoute(); WalkRoute(); + + hitcontentsmaski = CONTENTBITS_MONSTER; runstandardplayerphysics(this); SetOrigin(origin); IdleNoise();