Skip to content

Commit

Permalink
Fixed applying of dymanic lights to models
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Apr 19, 2018
1 parent 75129f5 commit 9398d60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gl/scene/gl_sprite.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -523,6 +523,7 @@ inline void GLSprite::PutSprite(bool translucent)
{
list = GLDL_MODELS;
}
dynlightindex = -1;
auto newsprt = gl_drawinfo->drawlists[list].NewSprite();
*newsprt = *this;
}
Expand Down

0 comments on commit 9398d60

Please sign in to comment.