diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index d4188f3a0..cc3e5be60 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -351,7 +351,7 @@ void GLSprite::Draw(int pass) if (gl_lights && GLRenderer->mLightCount && mDrawer->FixedColormap == CM_DEFAULT && !fullbright) { if (modelframe && !particle) - gl_SetDynModelLight(gl_light_sprites ? actor : NULL, dynlightindex); + dynlightindex = gl_SetDynModelLight(gl_light_sprites ? actor : NULL, dynlightindex); else gl_SetDynSpriteLight(gl_light_sprites ? actor : NULL, gl_light_particles ? particle : NULL); } @@ -523,6 +523,7 @@ inline void GLSprite::PutSprite(bool translucent) { list = GLDL_MODELS; } + dynlightindex = -1; auto newsprt = gl_drawinfo->drawlists[list].NewSprite(); *newsprt = *this; }