From ef79ec193f5335de0ef451ed73dcde6e8c500e7e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Sep 2023 22:33:03 +0200 Subject: [PATCH] - let P_CheckSwitchRange always check all 3 tiers. To account for cases that a switch is unreachable but another tier got a reachable one. --- src/playsim/p_switch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_switch.cpp b/src/playsim/p_switch.cpp index 73aa95daac..9daf8cf9d4 100644 --- a/src/playsim/p_switch.cpp +++ b/src/playsim/p_switch.cpp @@ -199,7 +199,7 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno, const DVector3 * ? (user->Top() >= open.top) : (user->Top() > open.top); } - else if ((TexAnim.FindSwitch(side->GetTexture(side_t::bottom))) != NULL) + if ((TexAnim.FindSwitch(side->GetTexture(side_t::bottom))) != NULL) { // Check 3D floors on back side { @@ -223,7 +223,7 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno, const DVector3 * ? (user->Z() <= open.bottom) : (user->Z() < open.bottom); } - else if ((flags & ML_3DMIDTEX) || (TexAnim.FindSwitch(side->GetTexture(side_t::mid))) != NULL) + if ((flags & ML_3DMIDTEX) || (TexAnim.FindSwitch(side->GetTexture(side_t::mid))) != NULL) { // 3DMIDTEX lines will force a mid texture check if no switch is found on this line // to keep compatibility with Eternity's implementation.