Mainly to avoid problems with Raze, but eliminating this constructor lets us catch erroneous local definitions via 'auto', which can cause major problems if left undetected.
Turns out that there's a few old maps that have the extended line flags set but not the guard bit that forces their clearance.
Astrostein 1's first map is an example for this.
# draw upper and lower textures when the back sector does not properly match
# do not draw middle textures on portal lines
# minor optimization to 'is***Portal' functions to avoid memory access in the most common case of no portal being present.
* 0: previous behavior (completely MAPINFO controlled)
* 1: always show level tally at the end of an episode
* 2: always show level tally even when changing levels within a hub
It was only used to avoid traversing the list if all sequences were paused which is an exceptional situation.
On the other hand, the way it counted was not correct so rather than fixing it it seemed more appropriate to remove it entirely.
Having everything lumped together made this a maintenance hassle because it affected how the level has to be stored.
This hasn't been tested yet, so it may not work as intended!
currentUILevel is now primaryLevel.
For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed.
This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer.
The remaining global variables are not relevant for the level state.
The static 'level' has been mostly removed from the code except some places that still need work.
I think these were the last two still missing it, all remaining uses of the global level variable are in code that doesn't get run through a level tick and are supposed to access the primary level.
There is one exception in ACS for a net arbitrator check.
Aside from this the bot_observer CVAR was also removed. This was never implemented properly and could stomp upon custom player settings.
The Map loader may not access any global state at all - everything it can touch must be exchangable.
Furthermore, if we want to sandbox each level, there may be no direct access to any kind of global state whatsoever from the play code.
- moved parts of the render setup out of the separate render functions.
Things like particle and polyobject linking were duplicated several times for rendering different things in different renderers.
These things only need to be set up once before the renderer is started so it makes a lot more sense to consolidate them into one place outside the actual rendering code.