mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
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:
parent
6655e92410
commit
4b447b3d0d
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue