From: Mario Date: Sun, 28 Jul 2024 04:25:17 +0000 (+1000) Subject: Don't override alpha values set by bgmscript when drawing client walls X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d094c3588132d0776276f77ce6a7adf8c23bc901;p=xonotic%2Fxonotic-data.pk3dir.git Don't override alpha values set by bgmscript when drawing client walls --- 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)