From b9dc06a4c8e519cc24543d61b87f56293c83cd0e Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 21 Aug 2017 18:42:07 +0200 Subject: [PATCH] - Fix crash in legacy and deferred light paths --- src/gl/scene/gl_spritelight.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gl/scene/gl_spritelight.cpp b/src/gl/scene/gl_spritelight.cpp index 4bc2588e8..8853f0c19 100644 --- a/src/gl/scene/gl_spritelight.cpp +++ b/src/gl/scene/gl_spritelight.cpp @@ -179,6 +179,13 @@ void BSPWalkCircle(float x, float y, float radiusSquared, const Callback &callba void gl_SetDynModelLight(AActor *self, bool hudmodel) { + // Legacy and deferred render paths gets the old flat model light + if (gl.lightmethod != LM_DIRECT) + { + gl_SetDynSpriteLight(self, nullptr); + return; + } + modellightdata.Clear(); if (self)