The next entry in the map rotation is now calculated upon entering a new level, instead of when the current level is being exited.
I refactored the map rotation system so that the next entry is calculated when the level is loaded, rather than when the current level is being exited. The next entry may only need to be re-calculated if the current player count is inadmissible, based on the entry's min/max player limits. This change has some benefits:
- It's now possible to show which entry in the map rotation is next via the
maplist
CCMD, which is also highlighted in blue. - It should fix this ticket on the tracker: https://zandronum.com/tracker/view.php?id=4052 now that the map rotation is advanced only after loading the next level, and only once.
- The
GetCurrentMapPosition
ACS function, which was added early on in 3.2, has been renamed toGetMapPosition
and can return either the current or next map positions. It's more utilitarian now than it was before.
P.S. for the sake of consistency, I also added some extra NETWORK_GetState( ) == NETSTATE_SERVER
checks in a few lines that didn't have them before, since it seems that the map rotation system is intended to be used only by the server in network games.
Edited by Adam Kaminski