Merge branch 'fix-directional-lighting-4p' into 'master'

Software: krangle directional lighting in 3P/4P splitscreen

See merge request KartKrew/Kart!2106
This commit is contained in:
AJ Martinez 2024-03-16 04:01:50 +00:00
commit 06d1d899bc

View file

@ -2363,6 +2363,14 @@ static void R_ProjectSprite(mobj_t *thing)
? interp.angle + (ang >= ANGLE_180 ? -ANGLE_90 : ANGLE_90) ? interp.angle + (ang >= ANGLE_180 ? -ANGLE_90 : ANGLE_90)
: R_PointToAngle(interp.x, interp.y)); : R_PointToAngle(interp.x, interp.y));
// Krangle contrast in 3P/4P because scalelight
// scales differently depending on the screen
// width (which is halved in 3P/4P).
if (r_splitscreen > 1)
{
extralight *= 2;
}
// Less change in contrast in dark sectors // Less change in contrast in dark sectors
extralight = FixedMul(extralight, std::min(std::max(0, lightnum), LIGHTLEVELS - 1) * FRACUNIT / (LIGHTLEVELS - 1)); extralight = FixedMul(extralight, std::min(std::max(0, lightnum), LIGHTLEVELS - 1) * FRACUNIT / (LIGHTLEVELS - 1));