mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +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
9726134af7
commit
3b7bf18971
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)
|
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
|
if (!(rover->flags & FF_EXISTS))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != SPACESPECIAL)
|
if (GETSECSPECIAL(rover->master->frontsector->special, 1) != SPACESPECIAL)
|
||||||
continue;
|
continue;
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
|
|
@ -1835,6 +1838,12 @@ static void P_CheckBouncySectors(player_t *player)
|
||||||
|
|
||||||
for (rover = node->m_sector->ffloors; rover; rover = rover->next)
|
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);
|
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);
|
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))
|
&& oldz + player->mo->height > P_GetFOFBottomZ(player->mo, node->m_sector, rover, oldx, oldy, NULL))
|
||||||
top = false;
|
top = false;
|
||||||
|
|
||||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
|
|
||||||
{
|
{
|
||||||
fixed_t linedist;
|
fixed_t linedist;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue