Consistent flat alignment
Does what it says on the tin. Consistent between the three different plane drawers:
* Software flat (previously the only one working as intended)
* Software sloped (took a lot of work)
* OpenGL flat and sloped (worked reasonably well but used different signs for some reason)
Check out root/!LatestSRB2Files/srb2win_branch_flat2.exe, root/toaster/flatalignment.wad and any in-dev DSZ1 to test it all out.
See merge request !78
NiGHTS Paraloop-special emblems
Implemented the two NiGHTS Emblem types in the TUDD via var modifications to ET_GLOBAL!
* GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem
* GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem
* Combined means that you essentially have to loop it twice.
Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM).
Check out root/!LatestSRB2Files/srb2win_branch_nightsemblems.exe with the latest patch.dta, along with root/toaster/nightstest.soc for a sample in GFZS.
See merge request !94
MF2_LINKDRAW reliability improvements
Seriously improves the reliability of the linkdraw system (in Software, the only rendering engine which actually does anything with this information), reducing the number of visual errors it produces significantly. Deliberately engineered to only affect objects with MF2_LINKDRAW applied.
Of particular note: Standing in shallow pools of water as Smiles will now reliably associate the bottom half of the tails following mobj with the underwater portion of Smiles' body, and the flicking ends with his un-submerged head.
Test with ```<root>/!LatestSRB2Files/srb2win_branch_linkdraw.exe``` and ```<root>/toaster/smiles.wad```.
See merge request !101
Wallspike tweaks
Sorry, MI. You told me to test the objects via objectplace, and they worked fine there - but @FuriousFox had some [issues](http://i.imgur.com/DQuLYzz.png) when he finally got to place them via mapthing.
Specifically, I think the problem this was caused by was a straight up copypaste of the "height" attribute of MT_SPIKE into the "radius" field of MT_WALLSPIKE, when it should technically be half that to match the intended collision box. Some other stuff also got adjusted to match when I solved this.
FF's happy now - they work well enough to place, even if their [collision is a little wonky](http://i.imgur.com/o2rG0tV.gifv), but that's an MF_PAPERCOLLISION issue and more than a quick fix to be done in an evening.
Nab ```<root>/!LatestSRB2Files/srb2win_branch_spikefix.exe``` to test.
UPDATE:
* Support for MF_PAPERCOLLISION tmhitthing in P_SlideMove.
* Knockback for wallspikes is much more consistent, fixing FF's gif as posted above/below.
* Optimised away a FixedDiv call when determining the slopetype of a line.
* Changed the position of the wallspike base slightly.
* Made it so NOTHING can step up onto the player outside of other players, essentially killing a bunch of springs-launch-with-players style bugs. (I was able to recreate that issue with the wallspikes until I added this, which is why I did it in this branch.)
* Wallspikes are now bustable.
* Invert the solidity mapthing flag for spikes and wallspikes.
* Improve the frame arrangement for vertical spikes' spriteset. (Requires new patch.dta)
* Make all spikes consistently do damage with DMG_SPIKE.
* (unrelated) renamed "flame stomp" to "elemental stomp" in P_HitDeathMessages.
* (unrelated) Make gas jets not make noise if they have the ambush flag, per Sphere's request.
See merge request !107
Charability trigger hotfix
Apparently when I made `P_RunTriggerSpecial` less than 3 years ago (August 2014) and cleaned up the trigger linedef code, I accidentally inverted the ability check for linedef types 305-307 by mistake, thereby causing the linedefs to activate for anyone EXCEPT those with the ability instead. Whoops.
See merge request !205
* Improve the code for busting vertical spikes.
* Improve the frame arrangement for vertical spikes' spriteset. (Requires new patch.dta)
* Make all spikes consistently do damage with DMG_SPIKE.
* (unrelated) renamed "flame stomp" to "elemental stomp" in P_HitDeathMessages
Fixes for Each Time and P_IsObjectOnGroundIn
Fixes the issue with Each Time reported here: https://mb.srb2.org/showthread.php?t=42818
Also fixes a separate issue with P_IsObjectOnGroundIn and intangible FOFs (where it determined that standing at the top height of them counted as being on the ground) which was also reproducable via the above bug funnily enough.
See merge request !204
* Support for MF_PAPERCOLLISION tmhitthing in P_SlideMove.
* Knockback for wallspikes is much more consistent.
* Optimised away a FixedDiv call when determining the slopetype of a line.
* Changed the position of the wallspike base slightly.
* Made it so NOTHING can step up onto the player outside of other players, essentially killing a bunch of springs-launch-with-players style bugs. (I was able to recreate that issue with the wallspikes until I added this, which is why I did it in this branch.)
MI hardcode again
Stuff hardcoded in this branch:
* Everything from SOC_TREE in patch.dta - the GFZ trees use thing types 806-808 and the other trees 810-816
* Everything from SOC_TOKE in patch.dta (but done better)
* Wall spikes, from Nev3r's DSZ/ACZ work, edited to actually hurt you on touch - these use thing type 522
MonsterIestyn/mi-hardcode-again on the FTP includes a test exe (srb2win-mihardcodeagain.exe) and a modified patch.dta (where SOC_TREE and SOC_TOKE are removed and missing wall spike sprites added). A test map for tokens in mario blocks is also included (marioblocktoken.wad).
See merge request !106
Or rather, I killed anything to do with the old background orb, renamed all "EMMY" stuff to "TOKEN", and of course adjusted the new S_TOKEN accordingly
Pwease no kicky
Don't kick Tails! Also, a movement for the WRITESINT8 to prevent modification to buf if the function bails early.
This can go into Master, right? It only matters for the host, and it's explicitly only having a major effect outside of netgames.
See merge request !201
*Add CONS_Printf messages for !netgame checks
*Arg count is checked first regardless of netgame status for both kick and ban, < 2 is checked instead of == 1 just in case these weren't called from console for some stupid reason?
*Moved Command_Kick's buffer vars to within the code that actually does kicking stuff
Lua archive value fix
This fixes some potential problems with archiving mobjinfo_t/state_t data via Lua in netgames (whether as custom mobj/player vars or by NetVars hook). Thanks to LJSonic for pointing this out to me.
See merge request !200
No more jumping springs FOR REAL!
The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.
Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.
Test with ```<root>/toaster/srb2springsagain.exe``` and ```<root>/DrTapeworm/springtest.wad```, via Mystic's secret server that [SOME jerk](https://www.youtube.com/watch?v=TRjXE_ZMT2s) keeps leaking from.
See merge request !199
Apart from the fact that UnArchiveValue reads UINT16 for both anyway (which alone causes problems), but UINT8 isn't even enough to store the higher end of the object types list and definitely most of the states welp
The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.
Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.
OpenGL papersprites
I don't know if anyone actually tested Sryder's original OpenGL papersprites support before it was merged in, but there was some issues with the papersprites themselves "wobbling" about in a sort of weird way depending on the angle you view it from or where you are. It's easiest to see what I mean if you just load up sawb.wad, and strafe about when viewing one of the sawblades.
Thankfully all I really needed to do was tweak the way angles work for papersprites. I also cleaned up Sryder's original code a little, not that I really needed to do so though.
See merge request !96
"MapThingSpawn" hook for Lua
A hook for adding special stuff to mobjs spawned via a map thing on level load, like special features depending on the map thing's flags, angle, z position, extrainfo, or anything else I didn't think of.
**Function syntax:**
`functionname(mobj, mapthing)`
where `mobj` is the spawned mobj (type mobj_t obviously), and `mapthing` is its corresponding map thing (type mapthing_t also obviously). Note that `mapthing.mobj` will not yet be set to `mobj` at this point (it's set afterwards, provided you don't remove the mobj or something stupid).
Returning `true` overrides features in place for existing mobj types (currently not all existing features are overridden, I may change this; see the source code for what IS overridable for now), returning `false` runs them as normal.
**Hook syntax:**
`addHook("MapThingSpawn", functionname, MT_OBJECTTYPE)`
where `MT_OBJECTTYPE` is the object type to apply the hooked function for. As usual, if this argument is omitted or set to MT_NULL, the function runs for all object types.
**Test resources and where to find them:**
* srb2win-mapthingspawn.exe, my folder on the FTP - test exe, obviously
* luatest-mapthingspawn.lua, same place - a simple Lua script that changes the scale of MT_GFZFLOWER1 (the orange flower) based on the map thing's angle (0 degrees is normal, 90 degrees is 2x bigger, 180 is 3x bigger, 270 is 4x, etc etc)
See merge request !83
MI code cleanup once again
Code prettification branch 12472849127, no real changes to gameplay except a bunch of outdated SOC features have been removed or disabled (most notably, Callum's old texture/patch SOC implementation). Though the changes here might also speed up game startup a teensy bit I suspect, possibly?
See merge request !102
Animdef type check fix
This fixes Sphere's problem with ANIMDEFS, where animated textures and animated flats with the same name cause one or the other not to animate (depending on the order they are in the ANIMDEFS lump, not the WAD; if the texture animdef comes first the texture animates, if the flat animdef comes first the flat animates).
The game now compares the "type" (i.e. whether the anim is for a texture or flat) of a new animdef with that of existing typedefs, before deciding whether to ignore it based on the starting lump's name.
See merge request !100