- Fix crash in legacy and deferred light paths

This commit is contained in:
Magnus Norddahl 2017-08-21 18:42:07 +02:00
parent 2375823055
commit b9dc06a4c8
1 changed files with 7 additions and 0 deletions

View File

@ -179,6 +179,13 @@ void BSPWalkCircle(float x, float y, float radiusSquared, const Callback &callba
void gl_SetDynModelLight(AActor *self, bool hudmodel) 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(); modellightdata.Clear();
if (self) if (self)