From: Mario Date: Sun, 31 May 2020 20:12:27 +0000 (+1000) Subject: Reset glowmod and colormap after the skipforcemodels label, to avoid cases where... X-Git-Tag: xonotic-v0.8.5~978 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=24ef7f8d5194b61d9c2a4aca1408d0b93c269bb8;p=xonotic%2Fxonotic-data.pk3dir.git Reset glowmod and colormap after the skipforcemodels label, to avoid cases where mutators might unintentionally force colors on respawn ghosts --- 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;