- fixed loop in ProcessBunch to account for array reallocation.

This commit is contained in:
Christoph Oelckers 2021-05-08 09:16:06 +02:00
parent df6a9823e3
commit 325af156e7

View file

@ -275,10 +275,13 @@ int BunchDrawer::ClipLine(int aline, bool portal)
void BunchDrawer::ProcessBunch(int bnch)
{
FBunch* bunch = &Bunches[bnch];
int start = bunch->startline;
int end = bunch->endline;
ClipWall.Clock();
for (int i = bunch->startline; i <= bunch->endline; i++)
for (int i = start; i <= end; i++)
{
bunch = &Bunches[bnch]; // re-get the pointer in case of reallocation.
int clipped = ClipLine(i, bunch->portal);
if (clipped & CL_Draw)