MD2 vertex/frame/triangle/etc limits checking
Fix for this bug: http://mb.srb2.org/showthread.php?t=42099
The model reading code didn't properly check if the model had too many vertices, so models with higher counts freely broke the game. This fix now stops that and prints an error message if that is the case.
However, it seems some models happily exceed other limits such as texcoords without problem (to my knowledge), so I've not bothered with checking those limits for now. Perhaps this could be a time to discuss if we need to change such limits again or not? Either way, one can easily uncomment my lines for checking texcoords/skins/triangles limits later if needed.
EDIT: I've allowed checking for triangle and frame limits too now, after some discussion.
See merge request !132
I added similar checks for the other num* but it seems some MD2s break the other limits without knowing anyway ...so I've commented these checks out for now, unless we have further discussion regarding them later on
P_IsPointInSubsector fix! (Most importantly: Knuckles No Longer In Space)
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.)
See merge request !128
Also, the "teleport" devmode command can now gracefully handle coordinates specified outside maps with no/few thok barriers, which previously prevented teleport via the thok barrier bleed's sector floor and ceiling being equal.
Fixing various problems with MF_SOLID collision
(I, toast, wrote the original merge request, but Alam made this merge request because I made a mistake. Twice. In a row.)
* Solid objects are now no longer intangible when your z is less than the other object's.
* I originally thought the bug was limited to just solid objects on slopes (hence the branch name), and was wondering about undesired side effects - but looking at this gfy, this was a major bug that slopes made easier to expose.
* Unfixed = http://gfycat.com/BareLimitedCavy
* Fixed = http://gfycat.com/JubilantOffensiveGar
* You now properly lose your momentum when jumping at a solid object.
* The way I fixed this was a hack, but it was originally a much worse hack which resulted in very bizzare physics issues, so...
* Unfixed = http://gfycat.com/ShockingAbsoluteArthropods (also demonstrates the first bug)
* Fixed = http://gfycat.com/EmbellishedCourageousGordonsetter
See merge request !119
Fixed players disappearing when spindashing whilst wearing multi-layer shields
* Before: http://i.imgur.com/gxUFElo.png
* After: http://i.imgur.com/NxsOg94.png
The problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this aspect of the issue sooner.
(SORRY FOR THE MULTIPLE MR'S AGAIN I TOTALLY SUCK AT REMEMBERING TO MAKE SURE IT GOES TO NEXT INSTEAD OF MASTER)
See merge request !124
v.drawScaled negative scales fix
Lua now errors if you try to use negative scales with v.drawScaled, rather than crashing as it does in 2.1.16 currently. Not much else to say here.
See merge request !126
Fixing FF_REVERSEPLATFORM clipping fixes
Forgot the case where == 0.
Tested by @wolfy852 in Top Down, where the bugs this caused were first discovered.
See merge request !121
Even more slope-related fixes
What it says on the tin pretty much:
Currently included fixes:
* Pusher specials applied to FOFs did not properly account for slopes applied to the bottom plane; this probably was just a minor slipup that appeared on adding the support in the first place, I take it? (some waterfall in the last section of SUGOI's Fudge Canyon is the only place I can think of offhand where this bug is noticable)
See merge request !114
Treating " as whitespace in TEXTURES (and animdefs too i guess)
SLADE adds this character in its TEXTURES editor and makes SRB2 cry unless the lump is manually edited; this just treats it as whitespace so we don't have to think too hard about it.
Also, two I_Errors now refer to the correct lump name.
See merge request !122
(the problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this issue sooner.)