From: Mario Date: Sun, 30 Sep 2018 14:08:09 +0000 (+1000) Subject: Don't perform various LOD/skeleton checks and handling when the player is invisible... X-Git-Tag: xonotic-v0.8.5~1797^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f565c243dbbdaf35c21681d7d6e1e3229e58afab;p=xonotic%2Fxonotic-data.pk3dir.git Don't perform various LOD/skeleton checks and handling when the player is invisible, saves a bit of performance while inside vehicles --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 035ba2a16..522859c8b 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -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);