diff --git a/src/playsim/p_switch.cpp b/src/playsim/p_switch.cpp index 9daf8cf9d..e89f03011 100644 --- a/src/playsim/p_switch.cpp +++ b/src/playsim/p_switch.cpp @@ -195,9 +195,12 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno, const DVector3 * } } - return (user->Level->i_compatflags2 & COMPATF2_CHECKSWITCHRANGE) + if ((user->Level->i_compatflags2 & COMPATF2_CHECKSWITCHRANGE) ? (user->Top() >= open.top) - : (user->Top() > open.top); + : (user->Top() > open.top)) + { + return true; + } } if ((TexAnim.FindSwitch(side->GetTexture(side_t::bottom))) != NULL) { @@ -219,9 +222,12 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno, const DVector3 * } } - return (user->Level->i_compatflags2 & COMPATF2_CHECKSWITCHRANGE) + if ((user->Level->i_compatflags2 & COMPATF2_CHECKSWITCHRANGE) ? (user->Z() <= open.bottom) - : (user->Z() < open.bottom); + : (user->Z() < open.bottom)) + { + return true; + } } if ((flags & ML_3DMIDTEX) || (TexAnim.FindSwitch(side->GetTexture(side_t::mid))) != NULL) {