Fix infinite loop in DimLights(). Should fix game locking up when finishing the final level.

This commit is contained in:
sirlemonhead 2019-11-29 21:24:11 +00:00 committed by Christoph Oelckers
parent cdf44030d7
commit 7b60bfdb95

View file

@ -1490,9 +1490,10 @@ void DimLights()
if (sector[i].floorshade < 100) if (sector[i].floorshade < 100)
sector[i].floorshade++; sector[i].floorshade++;
int nWall = sector[i].wallptr; short startwall = sector[i].wallptr;
short endwall = startwall + sector[i].wallnum;
while (nWall < nWall + sector[i].wallnum) for (int nWall = startwall; nWall < endwall; nWall++)
{ {
if (wall[nWall].shade < 100) if (wall[nWall].shade < 100)
wall[nWall].shade++; wall[nWall].shade++;