There is a Nova Shore enemy that switches between
MF_SPRING and MF_ENEMY, and the upper bits of the mass
field are conflicting.
We don't use this functionality aside from some SRB2
holdovers, but who cares about those? ;)
If player is in one of these states:
- Invincibility
- Grow (K_IsBigger)
- Flame Shield dash
- Over 200% speed
And the other object:
- Does not have MF_DONTPUNT
Then, touching a solid object:
- Punts the object, unless the object has MF_ELEMENTAL
- Fizzles the object, if the object has MF_ELEMENTAL
Or, when an object damages the player:
- That object is punted, unless it has MF_ELEMENTAL
- The object fizzles, if it has MF_ELEMENTAL
Punting means:
- A copy of the object is made
- Both the player and copy receive 5 tics of hitlag
- The copy is thrust away from the player at a minimum of
60 FU, or 2x either the player's or object's momentum,
whichever is ultimately greater
- The copy despawns after 2 seconds
- The copy flickers constantly, while thrust away
Fizzling means:
- The object disappears completely
- A puff of smoke is spawned in place of the object
- No hitlag is applied to the player
Both punting and fizzling:
- Hide the original object (intangible and invisible)
- The original object reppears after 30 seconds
- For 2 seconds before reappearing, the object flickers
back in, but is still intangible
- There's a freeze cheat bool to freeze everything except for players.
- There's a level freeze bool to freeze literally everything.
- There's a frozen bool on mobj_t to explicitly control freeze status on an object.
This commit handles everything except actually respawning
the player at a checkpoint.
- Checkpoints are formed by two checkpoint things (2030):
- thingarg0 - The ID for the checkpoint. Must be the
same for these two things, and these two
things only. ID cannot be 0.
- angle - The direction the player is intended to face
after respawning. Must be the same for both
things.
- Each checkpoint thing is a starpost with a stick and an
orb at the end.
- By default, the sticks are lowered to horizontal and
face toward the opposite starpost.
- Rainbow tether sparkles form a field between the two
starposts.
- When a player crosses between these two starposts, each
spins in the direction that the player crossed. The
sparkles also fly out in that direction.
- Over time the sticks pivot upward.
- When the starposts are done spinning, the sticks will be
pointing straight upward.
- Orb at the end of the stick begins flashing when the
starpost is done spinnning.
- Players may cross multiple checkpoints.
- When this happens, any previously activated checkpoint
will have its stick lowered back to horizontal, and its
orb will stop flashing.
- 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
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.
P_LineOpening results are stored in a locally made struct instead of being a bunch of disorganized globals.
Waypoint traversals can go thru 1 line, if it was blocked by step-up rules, for free, similar concept to sound-blocking lines in Doom.