From 3dfc3e73d283fff3becfbf37c92588563115a12a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 8 May 2021 15:23:45 +0200 Subject: [PATCH] - only process actually existing mirrors when updating their state. --- source/games/sw/src/draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 6b88ed6e3..c8305ebde 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1374,7 +1374,7 @@ void polymost_drawscreen(PLAYERp pp, int tx, int ty, int tz, binangle tang, fixe void UpdateWallPortalState() { // This is too obtuse to be maintained statically, but with 8 mirrors at most easy to be kept up to date. - for (int i = 0; i < MAXMIRRORS; i++) + for (int i = 0; i < mirrorcnt; i++) { if (mirror[i].mirrorwall < 0) { continue;