From d7164ba4e1fc1b7ba6710feb1a8af2abe7172892 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 23 Sep 2017 16:22:22 +0200 Subject: [PATCH] - Don't apply dynamic light to fullbright sprites --- src/polyrenderer/scene/poly_sprite.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index b2590c357..02cb9e657 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -372,6 +372,13 @@ FTexture *RenderPolySprite::GetSpriteTexture(AActor *thing, /*out*/ bool &flipX) void RenderPolySprite::SetDynlight(AActor *thing, PolyDrawArgs &args) { + bool fullbrightSprite = ((thing->renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT)); + if (fullbrightSprite) + { + args.SetDynLightColor(0); + return; + } + float lit_red = 0; float lit_green = 0; float lit_blue = 0;