Skip to content

Sectorlist traversal

toaster requested to merge sectorlist_traversal into next

MOM GET THE CAMERA

There's a LOT of code in the source that ended up mixing m_snext (the node for the next thing in the sector's thinglist) and m_tnext (the node for the next sector in the thing's sectorlist), so I renamed the following:

  • m_snext ==> m_thinglist_next
  • m_sprev ==> m_thinglist_prev
  • m_tnext ==> m_sectorlist_next
  • m_tprev ==> m_sectorlist_prev

Then, I changed all the instances where the code was trying to go m_thinglist_next on a mobj's touching_sectorlist (which would've just gone to the node for the next thing in the same sector, instead of the node for the next sector for the same thing). Notable samples:

  • FF_SHATTER blocks now disappear the moment you go into their sector. You still can't give FF_SOLID to them because in that case they will still stop you if you never enter their sector at all (ie - clip on corners), but having them nonsolid no longer allows you to phase through entirely without busting them (which was the whole downside of making them intangible in the first place).
  • You can now bump into multiple Mario blocks at a time, even if you're not exclusively in their sector.
  • No more getting randomly stopped on the edges of bouncy FOFs.
  • Landing on polyobjects might behave a little more consistently at the edge of their host sector.
  • Teetering did a SHITTON of code that basically never got executed, and then had directly-blockmap-accessing code as a backup. The code was activatable by replacing the m_thinglist_next with m_sectorlist_next, but it behaved SUPER differently from what we're used to with teetering (if the player mobj's edge was JUST off the edge of a platform, you ended up in teetering frames - even if it looked like you could stand) so I ended up removing that section entirely.

Any objections?

Merge request reports