From f565c243dbbdaf35c21681d7d6e1e3229e58afab Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 1 Oct 2018 00:08:09 +1000 Subject: [PATCH] Don't perform various LOD/skeleton checks and handling when the player is invisible, saves a bit of performance while inside vehicles --- qcsrc/client/csqcmodel_hooks.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.2