mhhm ternaries
This commit is contained in:
1 parent
efaf1eb2a1
commit
18163ec6d7
1 file changed
+4
-8
@@ -496,11 +496,9 @@ static FUINT HWR_CalcWallLight(FUINT lightnum, seg_t *seg)
|
||||
|
||||
if (seg != NULL && P_ApplyLightOffsetFine(lightnum, seg->frontsector))
|
||||
{
|
||||
if (cv_glfakecontrast.value == 2) // Smooth setting
|
||||
finallight += seg->hwLightOffset;
|
||||
else
|
||||
finallight += seg->lightOffset * 8;
|
||||
INT16 offset = (cv_glfakecontrast.value == 2) ? seg->hwLightOffset : ((INT16)seg->lightOffset * 8);
|
||||
|
||||
finallight += offset;
|
||||
finallight = CLAMP(finallight, 0 , 255);
|
||||
}
|
||||
|
||||
@@ -516,11 +514,9 @@ static FUINT HWR_CalcSlopeLight(FUINT lightnum, pslope_t *slope, const sector_t
|
||||
|
||||
if (slope != NULL && sector != NULL && P_ApplyLightOffsetFine(lightnum, sector))
|
||||
{
|
||||
if (cv_glfakecontrast.value == 2) // Smooth setting
|
||||
finallight += (fof ? -slope->hwLightOffset : slope->hwLightOffset);
|
||||
else
|
||||
finallight += (fof ? -slope->lightOffset * 8 : slope->lightOffset * 8);
|
||||
INT16 offset = (cv_glfakecontrast.value == 2) ? slope->hwLightOffset : (INT16)slope->lightOffset;
|
||||
|
||||
finallight += (fof ? -offset : offset);
|
||||
finallight = CLAMP(finallight, 0 , 255);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user