Skip to content

P_IsPointInSubsector fix! (Most importantly: Knuckles No Longer In Space)

toaster requested to merge hereicome_rougherthanleather into next

Now works in GL by not relying on stuff which GL mutates! Thanks for the guidance, @MonsterIestyn! Tested in Steel_Titanium's Nightlight Ruins (in SUGOI), which had the perfect testbed for plenty of Knuckles issues AND is one of the first maps out to the public which eschews thok barriers altogether in some sections.

  • Knuckles climbing on one sided lines is now super great and doesn't allow any space-climbing at all, OGL-exclusive OR renderer-independent. I was able to restore my earlier perfect-in-Software fix because now it also works fine in GL, too!
  • The devmode TELEPORT command now actually prevents you from going outside maps which don't have thok barriers near where you were. (It only prevented you from going outside maps with thok barriers because the thok barriers bled outwards and failed some other conditions.)
  • Camera now behaves identically between Software and GL. (Look closely at p_user.c - I didn't modify any code in that section, but the chasecam DOES call P_IsPointInSubsector...)
  • Here's a biggun - OpenGL precipitation is ALSO fixed! Yup. That's right. It used P_IsPointInSubsector too, and THAT'S why it was broken for all this time. (I did have to do a few other changes beyond just flipping the ifdef, but HOLY SHIT.) Tested this in Mystic Realm's second zone, which kept rain all the way through in OGL!!

(And yes, I AM compiling with OGL on for this branch.)

Merge request reports