mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Backwards compatibility: Add back bouncy FOF sector type, but mark it as deprecated
This commit is contained in:
parent
23efeeed8e
commit
5df079c653
3 changed files with 18 additions and 3 deletions
|
@ -15,6 +15,7 @@ sectortypes
|
|||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF <deprecated>";
|
||||
16 = "Trigger Line Ex. (Pushable Objects)";
|
||||
32 = "Trigger Line Ex. (Anywhere, All Players)";
|
||||
48 = "Trigger Line Ex. (Floor Touch, All Players)";
|
||||
|
@ -62,6 +63,7 @@ gen_sectortypes
|
|||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF <deprecated>";
|
||||
}
|
||||
|
||||
second
|
||||
|
|
|
@ -4336,7 +4336,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
|
|||
break;
|
||||
case 13: // Ramp Sector (Increase step-up/down)
|
||||
case 14: // Non-Ramp Sector (Don't step-down)
|
||||
case 15: // Unused
|
||||
case 15: // Bouncy FOF (deprecated)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6140,6 +6140,10 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
//Yes, this also affects other specials on the same sector. Sorry.
|
||||
sector->flags |= SF_TRIGGERSPECIAL_TOUCH;
|
||||
break;
|
||||
case 15: // Bouncy FOF
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n"));
|
||||
CheckForBouncySector = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// Process Section 2
|
||||
|
|
13
src/p_user.c
13
src/p_user.c
|
@ -2761,6 +2761,17 @@ static void P_CheckBouncySectors(player_t *player)
|
|||
if (!(rover->flags & FF_EXISTS))
|
||||
continue; // FOFs should not be bouncy if they don't even "exist"
|
||||
|
||||
// Handle deprecated bouncy FOF sector type
|
||||
if (GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
|
||||
{
|
||||
rover->flags |= FF_BOUNCY;
|
||||
rover->bouncestrength = P_AproxDistance(rover->master->dx, rover->master->dy)/100;
|
||||
if (rover->master->flags & ML_BOUNCY)
|
||||
rover->specialflags |= FS_DAMPEN;
|
||||
else
|
||||
rover->specialflags &= ~FS_DAMPEN;
|
||||
}
|
||||
|
||||
if (!(rover->flags & FF_BOUNCY))
|
||||
continue;
|
||||
|
||||
|
@ -2773,8 +2784,6 @@ static void P_CheckBouncySectors(player_t *player)
|
|||
if (player->mo->z + player->mo->height < bottomheight)
|
||||
continue;
|
||||
|
||||
//bouncestrength = P_AproxDistance(rover->master->dx, rover->master->dy)/100;
|
||||
|
||||
if (oldz < P_GetFOFTopZ(player->mo, node->m_sector, rover, oldx, oldy, NULL)
|
||||
&& oldz + player->mo->height > P_GetFOFBottomZ(player->mo, node->m_sector, rover, oldx, oldy, NULL))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue