The handling for the two frozen flags was totally inconsistent.
Furthermore, these need to be session data, not level data.
The old exported variables for this still exist and shadow the real state, but are deprecated now.
Frozen state should only be checked with "currentSession.isFrozen()" now.
The session data in the savegame was grouped and separated from the global state, which onl consists of server CVARs and RNG state now.
A few of the old level members will also be moved to the new class, now that workaround getters can be implemented.
These currently spit out some deprecation warnings which will be addressed next.
Thinkers are always part of a level if they are linked and active, so this reference needs to be kept so that a thinker can unlink itself on destruction.
It may be a bit tricky to separate per-session and per-level actions here - for now only the sound resuming has been moved because that cannot be done per level.
This time there was one important exported script function: Actor.Spawn.
Since this will require a level pointer in the new scheme of things the old version had to be deprecated, because it is static with no argument that allows retrieving the level. However, since this is probably one of the most widely used functions I added a workaround to let it continue to work if used from inside an actor class, which should constitute >95% of all uses. This required a little bit of hackery in the compiler backend to swap out the function if appropriate.
Aside from that there were 5 places in the internal ZScript that needed handling, which mostly consisted of making a formerly static internal function non-static.
- upload only the dynamic AABB subtree using glBufferSubData
- change internal raytracing stack limit from 16 to 32
- update shadowmap AABB tree after R_SetupFrame for proper frame interpolation
Unlike the other classes, the places where variables from this class were accessed were quite scattered so there isn't much scriptified code. Instead, most of these places are now using the script variable access methods.
This was the last remaining subclass of AActor, meaning that class Actor can now be opened for user-side extensions.
This was the only code using the ViewBob member variable.
This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.