Okay, this is a biggun. Pay attention, everyone.

Moved the handling of P_PlayerInSpecialSector to P_PlayerAfterThink from P_PlayerThink.
* This allows the player to get hurt on sloped lava surfaces that are moving downwards.
* Also prevents the player from standing on death pits for 1 tic.
* Prevents the player moving 1 extra tic's worth of movement of pain when hit by sector.
* Thankfully, no consequences re conveyors.
* Like, the only consequences I've found have been positive. However, this DOES need to be thoroughly investigated before it can be allowed anywhere near Next itself.
This commit is contained in:
toasterbabe 2016-10-31 20:15:11 +00:00
parent a2dabd7041
commit 04a38a683b
2 changed files with 17 additions and 0 deletions

View File

@ -495,4 +495,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// \note You should leave this enabled unless you're working with a future SRB2 version.
#define MUSICSLOT_COMPATIBILITY
/// Handle touching sector specials in P_PlayerAfterThink instead of P_PlayerThink.
/// \note Required for proper collision with moving sloped surfaces that have sector specials on them.
#define SECTORSPECIALSAFTERTHINK
#endif // __DOOMDEF__

View File

@ -8779,6 +8779,7 @@ void P_PlayerThink(player_t *player)
// check water content, set stuff in mobj
P_MobjCheckWater(player->mo);
#ifndef SECTORSPECIALSAFTERTHINK
#ifdef POLYOBJECTS
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
#endif
@ -8787,6 +8788,7 @@ void P_PlayerThink(player_t *player)
if (!player->spectator)
P_PlayerInSpecialSector(player);
#endif
if (player->playerstate == PST_DEAD)
{
@ -9148,6 +9150,17 @@ void P_PlayerAfterThink(player_t *player)
cmd = &player->cmd;
#ifdef SECTORSPECIALSAFTERTHINK
#ifdef POLYOBJECTS
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
#endif
player->onconveyor = 0;
// check special sectors : damage & secrets
if (!player->spectator)
P_PlayerInSpecialSector(player);
#endif
if (splitscreen && player == &players[secondarydisplayplayer])
thiscam = &camera2;
else if (player == &players[displayplayer])