mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Fix both Bouncy FOF and Space Countdown sector specials working on FOFs without the FF_EXISTS flag
Also move the Bouncy FOF sector special check above the FOF heights checking in P_CheckBouncySectors, because it means not having to waste time calculating FOF heights only for it not to be bouncy anyway :P
This commit is contained in:
parent
6be0f90fbe
commit
4f75ae3a68
1 changed files with 9 additions and 1 deletions
10
src/p_user.c
10
src/p_user.c
|
@ -1621,6 +1621,9 @@ boolean P_InSpaceSector(mobj_t *mo) // Returns true if you are in space
|
|||
|
||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
continue;
|
||||
|
||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != SPACESPECIAL)
|
||||
continue;
|
||||
#ifdef ESLOPE
|
||||
|
@ -1835,6 +1838,12 @@ static void P_CheckBouncySectors(player_t *player)
|
|||
|
||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
continue; // FOFs should not be bouncy if they don't even "exist"
|
||||
|
||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != 15)
|
||||
continue; // this sector type is required for FOFs to be bouncy
|
||||
|
||||
topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
bottomheight = P_GetFOFBottomZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL);
|
||||
|
||||
|
@ -1848,7 +1857,6 @@ static void P_CheckBouncySectors(player_t *player)
|
|||
&& oldz + player->mo->height > P_GetFOFBottomZ(player->mo, node->m_sector, rover, oldx, oldy, NULL))
|
||||
top = false;
|
||||
|
||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
|
||||
{
|
||||
fixed_t linedist;
|
||||
|
||||
|
|
Loading…
Reference in a new issue