mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-25 13:21:27 +00:00
- fixed: Assignment of GetLightLevel to GLWall::lightlevel must be clamped. This was done incorrectly in the last SVN version which clamped the result of GetLightLevel, causing problems elsewhere.
This commit is contained in:
parent
399d0974ab
commit
a73d1b792c
2 changed files with 6 additions and 6 deletions
|
@ -118,7 +118,7 @@ public:
|
|||
|
||||
fixed_t viewdistance;
|
||||
|
||||
BYTE lightlevel;
|
||||
int lightlevel;
|
||||
BYTE type;
|
||||
BYTE flags;
|
||||
short rellight;
|
||||
|
|
|
@ -1098,7 +1098,7 @@ void GLWall::BuildFFBlock(seg_t * seg, F3DFloor * rover,
|
|||
float to;
|
||||
lightlist_t * light;
|
||||
bool translucent;
|
||||
byte savelight=lightlevel;
|
||||
int savelight=lightlevel;
|
||||
FColormap savecolor=Colormap;
|
||||
float ul;
|
||||
float texlength;
|
||||
|
@ -1108,12 +1108,12 @@ void GLWall::BuildFFBlock(seg_t * seg, F3DFloor * rover,
|
|||
{
|
||||
if (!gl_fixedcolormap)
|
||||
{
|
||||
// this may not yet be done!
|
||||
// this may not yet be done
|
||||
light=P_GetPlaneLight(rover->target, rover->top.plane,true);
|
||||
Colormap.Clear();
|
||||
Colormap.LightColor=(light->extra_colormap)->Fade;
|
||||
// the fog plane defines the light level, not the front sector!
|
||||
lightlevel=*light->p_lightlevel;
|
||||
// the fog plane defines the light level, not the front sector
|
||||
lightlevel = gl_ClampLight(*light->p_lightlevel);
|
||||
gltexture=NULL;
|
||||
type=RENDERWALL_FFBLOCK;
|
||||
}
|
||||
|
@ -1520,7 +1520,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
|||
|
||||
int rel = 0;
|
||||
int orglightlevel = gl_ClampLight(frontsector->lightlevel);
|
||||
lightlevel = seg->sidedef->GetLightLevel(!!(flags&GLWF_FOGGY), orglightlevel, false, &rel);
|
||||
lightlevel = gl_ClampLight(seg->sidedef->GetLightLevel(!!(flags&GLWF_FOGGY), orglightlevel, false, &rel));
|
||||
if (orglightlevel >= 253) // with the software renderer fake contrast won't be visible above this.
|
||||
{
|
||||
rellight = 0;
|
||||
|
|
Loading…
Reference in a new issue