From 4b447b3d0db33c92ca1e542cc6a955af3dec45ea Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 28 Feb 2016 18:30:29 +0000 Subject: [PATCH] Don't add polyobjects to a mobj's sector nodes list. This causes the player to teeter whenever they are above the polyobject's bottom, whether or not it is solid Also, a minor tweak for the teetering code itself, though it looks a right mess and probably should be redone in the future --- src/p_map.c | 6 ++++++ src/p_user.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 61d57dcd1..760252c8b 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -3712,6 +3712,9 @@ static inline boolean PIT_GetSectors(line_t *ld) if (P_BoxOnLineSide(tmbbox, ld) != -1) return true; + if (ld->polyobj) // line belongs to a polyobject, don't add it + return true; + // This line crosses through the object. // Collect the sector(s) from the line and add to the @@ -3744,6 +3747,9 @@ static inline boolean PIT_GetPrecipSectors(line_t *ld) if (P_BoxOnLineSide(preciptmbbox, ld) != -1) return true; + if (ld->polyobj) // line belongs to a polyobject, don't add it + return true; + // This line crosses through the object. // Collect the sector(s) from the line and add to the diff --git a/src/p_user.c b/src/p_user.c index da65b7cb4..b3ba5f61f 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3087,7 +3087,7 @@ static void P_DoTeeter(player_t *player) } if (polybottom > player->mo->z + player->mo->height + tiptop - || (polybottom < player->mo->z + || (polytop < player->mo->z && player->mo->z + player->mo->height < player->mo->ceilingz - tiptop)) teeter = true; else @@ -3105,7 +3105,7 @@ static void P_DoTeeter(player_t *player) } if (polytop < player->mo->z - tiptop - || (polytop > player->mo->z + player->mo->height + || (polybottom > player->mo->z + player->mo->height && player->mo->z > player->mo->floorz + tiptop)) teeter = true; else