Fixed applying of dymanic lights to models

https://forum.zdoom.org/viewtopic.php?t=60301
This commit is contained in:
alexey.lysiuk 2018-04-19 12:50:07 +03:00
parent 75129f54b4
commit 9398d602f8

View file

@ -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;
}