diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index ee99501f4..18a356f09 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1008,10 +1008,12 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom fixed_t h, l; // 3D sides and 2s middle textures fixed_t hS, lS; - FUINT lightnum = 255; // shut up compiler + FUINT lightnum = 255; extracolormap_t *colormap; FSurfaceInfo Surf; + boolean tripwire; + gl_sidedef = gl_curline->sidedef; gl_linedef = gl_curline->linedef; @@ -1051,7 +1053,13 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom cliphigh = (float)(texturehpeg + (gl_curline->flength*FRACUNIT)); } - lightnum = HWR_CalcWallLight(gl_frontsector->lightlevel, gl_curline); + tripwire = P_IsLineTripWire(gl_linedef); + + if (tripwire == false) + { + lightnum = HWR_CalcWallLight(gl_frontsector->lightlevel, gl_curline); + } + colormap = gl_frontsector->extra_colormap; if (gl_frontsector) @@ -1427,7 +1435,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // This will cause the midtexture appear on top, if a FOF overlaps with it. blendmode |= PF_Decal; - if (gl_frontsector->numlights) + if (tripwire == false && gl_frontsector->numlights) { if (!(blendmode & PF_Masked)) HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_TRANSLUCENT, NULL, blendmode); // vanilla just uses PF_Masked here - if we run into any issues, maybe change to that diff --git a/src/r_segs.c b/src/r_segs.c index f671241cf..3d657657e 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -172,14 +172,16 @@ static void R_RenderMaskedSegLoop(drawseg_t *ds, INT32 x1, INT32 x2, INT32 texnu INT32 range; sector_t *front, *back; INT32 times, repeats; + boolean tripwire; ldef = curline->linedef; + tripwire = P_IsLineTripWire(ldef); range = max(ds->x2-ds->x1, 1); // Setup lighting based on the presence/lack-of 3D floors. dc_numlights = 0; - if (frontsector->numlights) + if (tripwire == false && frontsector->numlights) { dc_numlights = frontsector->numlights; if (dc_numlights >= dc_maxlights) @@ -226,19 +228,29 @@ static void R_RenderMaskedSegLoop(drawseg_t *ds, INT32 x1, INT32 x2, INT32 texnu } else { - if ((R_CheckColumnFunc(COLDRAWFUNC_FUZZY) == false) - || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))) - lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT); + if (tripwire) + { + lightnum = LIGHTLEVELS - 1; // tripwires are full bright + } else - lightnum = LIGHTLEVELS - 1; + { + if ((R_CheckColumnFunc(COLDRAWFUNC_FUZZY) == false) + || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))) + { + lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT); + } + else + { + lightnum = LIGHTLEVELS - 1; - if ((R_CheckColumnFunc(COLDRAWFUNC_FOG) == true) - || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))) - ; - else if (P_ApplyLightOffset(lightnum)) - lightnum += curline->lightOffset; + if (P_ApplyLightOffset(lightnum)) + { + lightnum += curline->lightOffset; + } + } - lightnum = R_AdjustLightLevel(lightnum); + lightnum = R_AdjustLightLevel(lightnum); + } if (lightnum < 0) walllights = scalelight[0];