Some basic fixed light support

This commit is contained in:
Magnus Norddahl 2016-11-15 23:30:42 +01:00
commit a092a03c6d
6 changed files with 21 additions and 10 deletions

View file

@ -244,7 +244,7 @@ int RenderPolyWall::GetLightLevel()
{
bool foggy = false;
int actualextralight = foggy ? 0 : extralight << 4;
return Line->sidedef->GetLightLevel(foggy, Line->frontsector->lightlevel) + actualextralight;
return clamp(Line->sidedef->GetLightLevel(foggy, Line->frontsector->lightlevel) + actualextralight, 0, 255);
}
}