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
This commit is contained in:
Monster Iestyn 2016-02-28 18:30:29 +00:00
parent 6655e92410
commit 4b447b3d0d
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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