From 24ef7f8d5194b61d9c2a4aca1408d0b93c269bb8 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 1 Jun 2020 06:12:27 +1000 Subject: [PATCH] Reset glowmod and colormap after the skipforcemodels label, to avoid cases where mutators might unintentionally force colors on respawn ghosts --- qcsrc/client/csqcmodel_hooks.qc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 3580a503a..adf549683 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -227,14 +227,6 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) this.skin = this.forceplayermodels_saveskin; } - if(this.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST) - { - // no glowmod or team colors for ghosts - this.glowmod = '0 0 0'; - this.colormap = 0; - return; - } - // forceplayercolors too if(teamplay) { @@ -290,6 +282,14 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) LABEL(skipforcemodels) + if(this.csqcmodel_effects & CSQCMODEL_EF_RESPAWNGHOST) + { + // no glowmod or team colors for ghosts + this.glowmod = '0 0 0'; + this.colormap = 0; + return; + } + // GLOWMOD AND DEATH FADING if(this.colormap > 0) this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true) * 2; -- 2.39.2