This isn't an optimization for the mobj pointer list, but it is an
optimization for level interpolators, which previously made N
allocations for N non-mobj thinkers. Now those allocations are amortized
according to std::vector's storage.
This could still be further cleaned up to be more C++-ey.
I do not trust memcpy due to the rendering bug even though it appeared to mostly work, so I did it manually. It's still order of magnitudes faster than reloading the level from scratch.
- Use srb2::MobjList to keep checkpoint objects list
intact after savegame load
- Use std::unordered_map of line tag and vector of line_t
pointers
- Use line tag for the key so multiple checkpoints may
be associated to the same set of lines
- v_draw.hpp was simply missing the header entirely.
- r_debug_printer.cpp is the weird one -- unordered_set's definition uses unordered_map, but it seems like osx's standard library does not include it in their definition? wut?
- SOC cannot edit S_NULL. (It already does it this way for sfxinfo and mobjinfo.)
- Lua cannot get or set S_NULL & MT_NULL. (It already does it this way for sfxinfo.)
- Lua cannot set a custom mobjinfo field called "string". (There is already a getter called "string", so this would create weird behavior for someone who doesn't know about it.)
Resync can be triggered when server/clients differ in the
number of Overtime laser objects spawned. For example,
when one of the clients is in splitscreen.
- MT_OVERTIME_PARTICLE had a spawnstate of S_NULL
- P_SetupStateAnimation is always called on spawn,
regardless of if the spawnstate is S_NULL
- S_NULL inexplicably has FF_RANDOMANIM in its frame flags
- This is NOT intentional and the likely source of the
error is SOC/Lua
- Setting MT_OVERTIME_PARTICLE's spawnstate to S_INVISIBLE
solves the problem
The compiler is just not smart enough to see that program flow is completely under order, so make sure every variable is initialised
(also change some variable types here and there)