]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't perform various LOD/skeleton checks and handling when the player is invisible...
authorMario <mario@smbclan.net>
Sun, 30 Sep 2018 14:08:09 +0000 (00:08 +1000)
committerMario <mario@smbclan.net>
Sun, 30 Sep 2018 14:08:09 +0000 (00:08 +1000)
qcsrc/client/csqcmodel_hooks.qc

index 035ba2a1647c29a2445ca54d73022670536cfed3..522859c8b193ea1d4c4729b72ba50d6322aafc5c 100644 (file)
@@ -600,7 +600,7 @@ void CSQCModel_Hook_PreDraw(entity this, bool isplayer)
                return;
        this.csqcmodel_predraw_run = framecount;
 
-       if(!this.modelindex || this.model == "null")
+       if(!this.modelindex || this.model == "null" || this.alpha < 0)
        {
                this.drawmask = 0;
                return;
@@ -608,7 +608,7 @@ void CSQCModel_Hook_PreDraw(entity this, bool isplayer)
        else
                this.drawmask = MASK_NORMAL;
 
-       if(this.isplayermodel) // this checks if it's a player MODEL!
+       if(this.isplayermodel && this.drawmask) // this checks if it's a player MODEL!
        {
                CSQCPlayer_ModelAppearance_Apply(this, this.entnum == player_localnum + 1);
                CSQCPlayer_LOD_Apply(this);