diff --git a/src/p_switch.cpp b/src/p_switch.cpp index 5aeff7b46..1ca4654b5 100644 --- a/src/p_switch.cpp +++ b/src/p_switch.cpp @@ -177,11 +177,11 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno) if ((TexMan.FindSwitch(side->GetTexture(side_t::top))) != NULL) { - return (user->z + user->height >= open.top); + return (user->z + user->height > open.top); } else if ((TexMan.FindSwitch(side->GetTexture(side_t::bottom))) != NULL) { - return (user->z <= open.bottom); + return (user->z < open.bottom); } else if ((flags & ML_3DMIDTEX) || (TexMan.FindSwitch(side->GetTexture(side_t::mid))) != NULL) { @@ -194,7 +194,7 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno) else { // no switch found. Check whether the player can touch either top or bottom texture - return (user->z + user->height >= open.top) || (user->z <= open.bottom); + return (user->z + user->height > open.top) || (user->z < open.bottom); } }