From: Rudolf Polzer Date: Sat, 7 Jan 2012 17:14:29 +0000 (+0100) Subject: simplify forcemodels code a bit X-Git-Tag: xonotic-v0.6.0~188^2~16^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=13473bb65989876d8bf74cfa9e1a6e4efa65a6fe;p=xonotic%2Fxonotic-data.pk3dir.git simplify forcemodels code a bit --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 3c7368301..320ae656b 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -165,7 +165,7 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer) } // apply it - if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && self.entnum == player_localnum + 1) + if(autocvar_cl_forcemyplayermodel != "" && forceplayermodels_myisgoodmodel && islocalplayer) { self.model = forceplayermodels_mymodel; self.modelindex = forceplayermodels_mymodelindex; @@ -193,7 +193,7 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer) // forceplayercolors too if(!teamplay) { - if(autocvar_cl_forcemyplayercolors && self.entnum == player_localnum + 1) + if(autocvar_cl_forcemyplayercolors && islocalplayer) self.colormap = 1024 + autocvar_cl_forcemyplayercolors; else if(autocvar_cl_forceplayercolors) self.colormap = player_localnum + 1; @@ -468,8 +468,8 @@ void CSQCModel_Hook_PreDraw() if(self.isplayermodel) // this checks if it's a player MODEL! { - CSQCPlayer_GlowMod_Apply(); CSQCPlayer_ForceModel_Apply(self.entnum == player_localnum + 1); + CSQCPlayer_GlowMod_Apply(); CSQCPlayer_LOD_Apply(); CSQCPlayer_FallbackFrame_Apply(); }