- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
SRB2 uses a LOT of mapthing args compared to Hexen (which has none) and ZDoom (which only has them on objects that will never ever activate scripts). So we really badly needed to separate the two if we want attaching scripts to things to be useful.
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.
So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
Lines, sides, sectors, and things now all support the "Custom" tab properly. Label a property as `user_[whatever you want]` in this tab, and it will be added to the structure. ACS will then be able to retrieve it using the `Get[x]UserProperty()` function.
- Lines can be set to activate when crossing or bumping into them, with distinctions for players, enemies, and missiles+items.
- A new flag has been added to determine if a line special can activate more than once.
- Finish Line + Respawn Line are now handled like other specials. This means that:
- They follow the new line activation rules (so you can potentially have a finish line that you have to bump instead of cross)
- More importantly, they can be called as functions in ACS. (Player_FinishLine and Player_Respawn)
- Fixed linedef flags not being saved in save games.
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
Line specials 777 - slope floor by anchors, 778 - slope ceiling by anchors,
779 - slope floor and ceiling by anchors.
Thing types 777 - floor anchors, 778 - ceiling anchors.
Summary.
These line specials slope the front or back sector's floor/ceiling by 'anchor'
things. Anchors are floor or ceiling specific and snap to the nearest vertex.
Using this method it is possible to create seamless slopes, without even
tagging.
Details.
Normal slope flags apply. To slope the backside sector, set No Climb on the
line. An anchor each is required to be near three of a sector's vertices in
order to slope it. More may be present but the order is undefined.
We don't need the ability to make invisible walls for enemies as often as we've needed invisible walls for players that don't block their thrown items.