From 6e1554d7aee561129b4e28d19b792b05cfca9468 Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Sat, 8 May 2021 07:13:47 -0400 Subject: [PATCH] Fix mirror updates in Shadow Warrior --- source/games/sw/src/draw.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 524e2ef0b..6b88ed6e3 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1376,7 +1376,10 @@ 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++) { - auto wal = &wall[mirror[i].mirrorwall]; + if (mirror[i].mirrorwall < 0) { + continue; + } + walltype* wal = &wall[mirror[i].mirrorwall]; wal->portalflags = 0; wal->portalnum = 0;