From 3d54173ad1eefe81e9d0bdf9754793ca95775485 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 20 Jan 2020 17:58:45 +0000 Subject: [PATCH] Make sure glowmod is set properly, even on viewmodels (bug reported by xaGe). git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5603 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_ents.c | 6 +++--- engine/client/cl_parse.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index d31d11e2..01082212 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -5330,6 +5330,7 @@ void CL_LinkPlayers (void) #ifdef PEXT_SCALE ent->scale = state->scale; #endif + ent->glowmod[0] = ent->glowmod[1] = ent->glowmod[2] = 1; ent->shaderRGBAf[0] = state->colourmod[0]/32.0f; ent->shaderRGBAf[1] = state->colourmod[1]/32.0f; ent->shaderRGBAf[2] = state->colourmod[2]/32.0f; @@ -5538,9 +5539,8 @@ void CL_LinkViewModel(void) ent.angles[1] = cl_gunangley.value; ent.angles[2] = cl_gunanglez.value; - ent.shaderRGBAf[0] = 1; - ent.shaderRGBAf[1] = 1; - ent.shaderRGBAf[2] = 1; + ent.glowmod[0] = ent.glowmod[1] = ent.glowmod[2] = 1; + ent.shaderRGBAf[0] = ent.shaderRGBAf[1] = ent.shaderRGBAf[2] = 1; ent.shaderRGBAf[3] = alpha; if (alpha != 1) { diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 871124c3..b5deae0f 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -4699,6 +4699,9 @@ static void CL_ParseStaticProt (int baselinetype) #ifdef PEXT_SCALE ent->scale = es.scale/16.0; #endif + ent->glowmod[0] = (8.0f/256.0f)*es.glowmod[0]; + ent->glowmod[1] = (8.0f/256.0f)*es.glowmod[1]; + ent->glowmod[2] = (8.0f/256.0f)*es.glowmod[2]; ent->shaderRGBAf[0] = (8.0f/256.0f)*es.colormod[0]; ent->shaderRGBAf[1] = (8.0f/256.0f)*es.colormod[1]; ent->shaderRGBAf[2] = (8.0f/256.0f)*es.colormod[2];