mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge pull request #339 from eevee/strict-switch-range
Don't allow pressing a checkswitchrange switch that's in the floor
This commit is contained in:
commit
266af2e872
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue