From 221ad539ca764d60cae04ef18e521f982ebb421f Mon Sep 17 00:00:00 2001 From: Sheldon Johnson Date: Mon, 14 Oct 2024 01:15:52 +1100 Subject: [PATCH] Fix missing glow on client side flag models --- csqc/pmove.qc | 8 ++++---- csqc/tfx.qc | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/csqc/pmove.qc b/csqc/pmove.qc index e23a9da5..8db34cec 100644 --- a/csqc/pmove.qc +++ b/csqc/pmove.qc @@ -928,8 +928,8 @@ static void ParseCvars() { #define MUX_IN(ef, bit, src) \ do { if ((ef) & (bit)) { rad = max(rad, src.i); col += src.v; } } while (0) -static void LocalEffects() { - float effects = pstate_server.effects; + +void LocalEffects(float effects, vector org) { float rad = 0; vector col = '0 0 0'; @@ -946,7 +946,7 @@ static void LocalEffects() { MUX_IN(effects, EF_BLUE, bluelight_l); rad = min(rad, 400); - dynamiclight_add(pm.vieworg, rad, col); + dynamiclight_add(org, rad, col, 0, "", 0); } #undef MUX_IN @@ -958,7 +958,7 @@ void PM_UpdateView() { makevectors(view_angles); SetListener(pm.vieworg, v_forward, v_right, v_up); - LocalEffects(); + LocalEffects(pstate_server.effects, pm.vieworg); } //////////////////////////////////////////////////////////////////////////////// diff --git a/csqc/tfx.qc b/csqc/tfx.qc index 43550a41..4fc44980 100644 --- a/csqc/tfx.qc +++ b/csqc/tfx.qc @@ -260,6 +260,8 @@ float UpdateFlag(float isnew) { /* UpdateFlagOutline(self); */ + LocalEffects(self.effects, self.origin); + if (self.skin == team_no) { local float distance = vlen(self.origin - PM_Org()); self.alpha = min(0.25 + (distance / 200), 1);