]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't override alpha values set by bgmscript when drawing client walls
authorMario <mario.mario@y7mail.com>
Sun, 28 Jul 2024 04:25:17 +0000 (14:25 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 28 Jul 2024 04:25:17 +0000 (14:25 +1000)
qcsrc/common/mapobjects/models.qc

index dfc96666e55ac88a09f4d407b44401f720cac6fa..f89d4cf903db44486ec412fa98ee537361feb49f 100644 (file)
@@ -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)