Fix even slope lighting being inconsistent

This commit is contained in:
Sally Coolatta 2022-05-27 18:34:52 -04:00
parent ea96a33e41
commit d5c384bf02
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ void P_UpdateSlopeLightOffset(pslope_t *slope)
} }
else else
{ {
light = FixedDiv(R_PointToAngle2(0, 0, abs(slope->d.x), abs(slope->d.y)), ANGLE_90); light = FixedDiv(R_PointToAngle2(0, 0, abs(slope->normal.y), abs(slope->normal.x)), ANGLE_90);
} }
zMul = min(FRACUNIT, abs(slope->zdelta)*3/2); // *3/2, to make 60 degree slopes match walls. zMul = min(FRACUNIT, abs(slope->zdelta)*3/2); // *3/2, to make 60 degree slopes match walls.

View file

@ -388,7 +388,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
if (slope != NULL && P_ApplyLightOffset(lightlevel >> LIGHTSEGSHIFT)) if (slope != NULL && P_ApplyLightOffset(lightlevel >> LIGHTSEGSHIFT))
{ {
if (reverseLight) if (reverseLight && maplighting.directional == true)
{ {
lightlevel -= slope->lightOffset * 8; lightlevel -= slope->lightOffset * 8;
} }