From 3e2a17538bef6aa291a0b32ec274501a326fc73f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 6 Oct 2014 09:05:42 +0200 Subject: [PATCH] - fixed: HUD weapons were affected by dynamic lights even when the CVARs said that they shouldn't. --- src/gl/scene/gl_weapon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_weapon.cpp b/src/gl/scene/gl_weapon.cpp index 96b4d9137..db428bc48 100644 --- a/src/gl/scene/gl_weapon.cpp +++ b/src/gl/scene/gl_weapon.cpp @@ -388,7 +388,10 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep) } else { - gl_SetDynSpriteLight(playermo, NULL); + if (gl_lights && GLRenderer->mLightCount && !gl_fixedcolormap) + { + gl_SetDynSpriteLight(playermo, NULL); + } gl_SetColor(statebright[i] ? 255 : lightlevel, 0, cmc, trans, true); } DrawPSprite(player, psp, psp->sx + ofsx, psp->sy + ofsy, hudModelStep, OverrideShader, !!(vis.RenderStyle.Flags & STYLEF_RedIsAlpha));