diff --git a/src/p_mobj.c b/src/p_mobj.c index 0141c47d..d65ecee3 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2703,7 +2703,7 @@ static void P_PlayerZMovement(mobj_t *mo) msecnode_t *node; boolean stopmovecut = false; - for (node = mo->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = mo->touching_sectorlist; node; node = node->m_sectorlist_next) { sector_t *sec = node->m_sector; subsector_t *newsubsec; @@ -3648,7 +3648,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj) if (!(netgame && mobj->player->spectator)) { // Crumbling platforms - for (node = mobj->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = mobj->touching_sectorlist; node; node = node->m_sectorlist_next) { fixed_t topheight, bottomheight; ffloor_t *rover; @@ -3673,7 +3673,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj) { boolean thereiswater = false; - for (node = mobj->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = mobj->touching_sectorlist; node; node = node->m_sectorlist_next) { if (node->m_sector->ffloors) { @@ -3694,7 +3694,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj) } if (thereiswater) { - for (node = mobj->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = mobj->touching_sectorlist; node; node = node->m_sectorlist_next) { if (node->m_sector->ffloors) { diff --git a/src/p_spec.c b/src/p_spec.c index 25e32e57..0bd53027 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3308,7 +3308,7 @@ sector_t *P_PlayerTouchingSectorSpecial(player_t *player, INT32 section, INT32 n return rover->master->frontsector; } - for (node = player->mo->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = player->mo->touching_sectorlist; node; node = node->m_sectorlist_next) { if (GETSECSPECIAL(node->m_sector->special, section) == number) { @@ -4657,7 +4657,7 @@ void P_PlayerInSpecialSector(player_t *player) P_RunSpecialSectorCheck(player, sector); // Iterate through touching_sectorlist - for (node = player->mo->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = player->mo->touching_sectorlist; node; node = node->m_sectorlist_next) { sector = node->m_sector; diff --git a/src/p_user.c b/src/p_user.c index 2156f0fc..c9ac9f54 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2849,86 +2849,10 @@ static boolean PIT_CheckSolidsTeeter(mobj_t *thing) // static void P_DoTeeter(player_t *player) { - msecnode_t *node; boolean teeter = false; boolean roverfloor; // solid 3d floors? - boolean checkedforteeter = false; const fixed_t tiptop = FixedMul(MAXSTEPMOVE, player->mo->scale); // Distance you have to be above the ground in order to teeter. - for (node = player->mo->touching_sectorlist; node; node = node->m_thinglist_next) - { - // Ledge teetering. Check if any nearby sectors are low enough from your current one. - checkedforteeter = true; - roverfloor = false; - if (node->m_sector->ffloors) - { - ffloor_t *rover; - for (rover = node->m_sector->ffloors; rover; rover = rover->next) - { - if (!(rover->flags & FF_EXISTS)) continue; - - if (P_CheckSolidLava(player->mo, rover)) - ; - else if (!(rover->flags & FF_BLOCKPLAYER || rover->flags & FF_QUICKSAND)) - continue; // intangible 3d floor - - if (player->mo->eflags & MFE_VERTICALFLIP) - { - if (*rover->bottomheight > node->m_sector->ceilingheight) // Above the ceiling - continue; - - if (*rover->bottomheight > player->mo->z + player->mo->height + tiptop - || (*rover->topheight < player->mo->z - && player->mo->z + player->mo->height < node->m_sector->ceilingheight - tiptop)) - { - teeter = true; - roverfloor = true; - } - else - { - teeter = false; - roverfloor = true; - break; - } - } - else - { - if (*rover->topheight < node->m_sector->floorheight) // Below the floor - continue; - - if (*rover->topheight < player->mo->z - tiptop - || (*rover->bottomheight > player->mo->z + player->mo->height - && player->mo->z > node->m_sector->floorheight + tiptop)) - { - teeter = true; - roverfloor = true; - } - else - { - teeter = false; - roverfloor = true; - break; - } - } - } - } - - if (!teeter && !roverfloor) - { - if (player->mo->eflags & MFE_VERTICALFLIP) - { - if (node->m_sector->ceilingheight > player->mo->z + player->mo->height + tiptop) - teeter = true; - } - else - { - if (node->m_sector->floorheight < player->mo->z - tiptop) - teeter = true; - } - } - } - - if (checkedforteeter && !teeter) // Backup code { subsector_t *subsec[4]; // changed abcd into array instead UINT8 i; @@ -3147,7 +3071,7 @@ teeterdone: if ((player->mo->state == &states[S_PLAY_STND] || player->mo->state == &states[S_PLAY_TAP1] || player->mo->state == &states[S_PLAY_TAP2] || player->mo->state == &states[S_PLAY_SUPERSTAND])) P_SetPlayerMobjState(player->mo, S_PLAY_TEETER1); } - else if (checkedforteeter && (player->mo->state == &states[S_PLAY_TEETER1] || player->mo->state == &states[S_PLAY_TEETER2] || player->mo->state == &states[S_PLAY_SUPERTEETER])) + else if ((player->mo->state == &states[S_PLAY_TEETER1] || player->mo->state == &states[S_PLAY_TEETER2] || player->mo->state == &states[S_PLAY_SUPERTEETER])) P_SetPlayerMobjState(player->mo, S_PLAY_STND); } @@ -7037,7 +6961,7 @@ static void P_MovePlayer(player_t *player) player->mo->y += player->mo->momy; P_SetThingPosition(player->mo); - for (node = player->mo->touching_sectorlist; node; node = node->m_thinglist_next) + for (node = player->mo->touching_sectorlist; node; node = node->m_sectorlist_next) { if (!node->m_sector) break;