- MT_EXPLODE is spawned by MT_RANDOMITEM on certain types of pop-in
- MT_DUELBOMB and MT_MINERADIUS are both Duel hazard visuals that were missing
- MT_FOLLOWER is added to match MT_PLAYER
- Add comments to make clear why/how we're dividing this stuff
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.
This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.
This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
Takes two screenshots for a list of maps that have an "Alternate View Point" thing with tag 0 -- one intended for level select pictures and another for Discord Rich Presence. If no view point exists, the map is skipped.
- Column would be zero length if there are no visible
pixels in it.
- Trying to draw such a column results in a negative
heightmask in R_DrawColumnTemplate and a probable read
out of bounds.
- In R_DrawColumnTemplate, texheight is used to switch
between a non-PO2 rasterizer and a more efficient PO2
rasterizer.
- There is bounds checking on the non-PO2 version (in the
form of sourcelength) but not on the PO2 version.
- texheight was set to the sprite patch height, which may
be taller than the column (sourcelength), leading to a
read out of bounds.
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