mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 12:51:09 +00:00
- fixed: Sprite splitting at 3D floors must set the fog parameters for the new light level.
This commit is contained in:
parent
9eb18a9e45
commit
8ca07443f1
1 changed files with 8 additions and 2 deletions
|
@ -239,7 +239,9 @@ void GLSprite::Draw(int pass)
|
||||||
secplane_t *topplane = i == 0 ? &topp : &(*lightlist)[i].plane;
|
secplane_t *topplane = i == 0 ? &topp : &(*lightlist)[i].plane;
|
||||||
secplane_t *lowplane = i == (*lightlist).Size() - 1 ? &bottomp : &(*lightlist)[i + 1].plane;
|
secplane_t *lowplane = i == (*lightlist).Size() - 1 ? &bottomp : &(*lightlist)[i + 1].plane;
|
||||||
|
|
||||||
int thisll = (*lightlist)[i].caster != NULL ? gl_ClampLight(*(*lightlist)[i].p_lightlevel) : lightlevel;
|
int thislight = (*lightlist)[i].caster != NULL ? gl_ClampLight(*(*lightlist)[i].p_lightlevel) : lightlevel;
|
||||||
|
int thisll = (byte)gl_CheckSpriteGlow(actor->Sector, thislight, actor->InterpolatedPosition(r_TicFracF));
|
||||||
|
|
||||||
FColormap thiscm;
|
FColormap thiscm;
|
||||||
thiscm.FadeColor = Colormap.FadeColor;
|
thiscm.FadeColor = Colormap.FadeColor;
|
||||||
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
||||||
|
@ -249,6 +251,10 @@ void GLSprite::Draw(int pass)
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_SetColor(thisll, rel, thiscm, trans);
|
gl_SetColor(thisll, rel, thiscm, trans);
|
||||||
|
if (!foglayer)
|
||||||
|
{
|
||||||
|
gl_SetFog(thislight, rel, &thiscm, additivefog);
|
||||||
|
}
|
||||||
gl_RenderState.SetSplitPlanes(*topplane, *lowplane);
|
gl_RenderState.SetSplitPlanes(*topplane, *lowplane);
|
||||||
}
|
}
|
||||||
else if (clipping)
|
else if (clipping)
|
||||||
|
@ -930,7 +936,7 @@ void GLSprite::ProcessParticle (particle_t *particle, sector_t *sector)//, int s
|
||||||
|
|
||||||
lightlevel = gl_ClampLight(sector->GetTexture(sector_t::ceiling) == skyflatnum ?
|
lightlevel = gl_ClampLight(sector->GetTexture(sector_t::ceiling) == skyflatnum ?
|
||||||
sector->GetCeilingLight() : sector->GetFloorLight());
|
sector->GetCeilingLight() : sector->GetFloorLight());
|
||||||
foglevel = sector->lightlevel;
|
foglevel = (BYTE)clamp<short>(sector->lightlevel, 0, 255);
|
||||||
|
|
||||||
if (gl_fixedcolormap)
|
if (gl_fixedcolormap)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue