If non-NULL, filesearch will begin in that subfolder of the desired searchpath, but can go back up to the root of the search later if not found in that location.
Primarily a small optimisation for checking the addons folder first
Does not require a demoversion bump, was a plain mistake in write condition. Previously dependent on whether the memory of `player->follower` - a mobj_t reference - was nonzero, instead of the actual followerskin ID. We essentially got REALLY lucky that TA properly saved 'em currently so we don't have to do a ton of hex editing just to make them visible again
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.
- Cleans up codebase in some high density regions
- Prevents crashing on the title screen due to old demos being played before we replace staffghosts
- Guarantees nothing we don't want slips in
- Built off g_fast_forward to utilise a lot of existing structure
- Only does steps of 5 seconds and therefore isn't precise, but that's better than having to rewatch/fastforward through the entire thing
- No single frame step back or general in-motion rewind preview, but that was all overkill
- Demos/Ghosts that end before ticking once are now correctly ignored. (ResolvesKartKrew/RingRacers#168)
- There was code for discovering it on read! It was just placed slightly too early, probably due to the conversion for netreplays! I'm very mad!
- As a preventative measure, demos *recorded* before ticking will simply not save in the first place.
- This was also a frustratingly easy fix for the amount of headache it's caused us.
- Reduced the amount of copypasted boilerplate by simplifying the places where DEMOMARKER can be written (and therefore read).
- Previously, like half the write functions tried to guess their own output size and potentially end the demo at any point.
- At best, this will grant us a few tics of reprireve for large netgames and MAYBE a handful of seconds for time attack, The Mode In Which The Aim Is To Go Fast.
- Instead, double the size of the deadspace buffer extension and just check to see if we've crossed into that territory.