From d094c3588132d0776276f77ce6a7adf8c23bc901 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 28 Jul 2024 14:25:17 +1000 Subject: [PATCH] Don't override alpha values set by bgmscript when drawing client walls --- qcsrc/common/mapobjects/models.qc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index dfc96666e..f89d4cf90 100644 --- a/qcsrc/common/mapobjects/models.qc +++ b/qcsrc/common/mapobjects/models.qc @@ -242,8 +242,6 @@ void Ent_Wall_PreDraw(entity this) { if (vdist(player_dist_math, >=, this.fade_start)) alph = 0; - else - alph = 1; } else { @@ -253,13 +251,12 @@ void Ent_Wall_PreDraw(entity this) / (this.fade_end - this.fade_start), 1)) / 100.0; } } - else - { - alph = 1; - } } this.alpha = alph; - this.drawmask = (alph <= 0) ? 0 : MASK_NORMAL; + if(this.alpha >= ALPHA_MIN_VISIBLE) + this.drawmask = MASK_NORMAL; + else + this.drawmask = 0; } void Ent_Wall_Draw(entity this) @@ -290,11 +287,6 @@ void Ent_Wall_Draw(entity this) } else this.alpha = 1; - - if(this.alpha >= ALPHA_MIN_VISIBLE) - this.drawmask = MASK_NORMAL; - else - this.drawmask = 0; } void Ent_Wall_Remove(entity this) -- 2.39.2