MantisBT - Zandronum
View Issue Details
0004125Zandronum[All Projects] Suggestionpublic2023-04-05 13:592023-05-01 19:01
Trillster 
 
normalfeatureN/A
newopen 
 
 
0004125: A function that replicates `map` (and `changemap`)
Mega Man 8-Bit Deathmatch uses ConsoleCommand for `map` for hard reset purposes, since some latched cvars cannot take effect until a hard reset. We also do use it to also change the map in some particular campaign scenarios to boot online players out of campaign exclusive maps.

Tangentially related to this ticket would be a function that just emulates `changemap`, because while ChangeLevel exists, that function is more geared towards cooperative and survival uses.

The broadest way to implement all of these would be a ChangeMap function which takes a `mapcode` parameter and `reset` parameter which swaps it to a `map` style change. Modders can already grab the current map code, so this function could be used in conjunction to perform hard resets to same map.
No tags attached.
child of 0001070new Dusk Phasing out the dangerous ConsoleCommand for various additional/improved ACS commands 
Issue History
2023-04-05 13:59TrillsterNew Issue
2023-04-05 19:10KaminskyRelationship addedchild of 0001070
2023-04-30 22:30TrillsterNote Added: 0022834
2023-04-30 23:38WaTaKiDNote Added: 0022835
2023-05-01 15:12DrinkyBirdNote Added: 0022836
2023-05-01 19:01TrillsterNote Added: 0022837

Notes
(0022834)
Trillster   
2023-04-30 22:30   
Adding a note that it could potentially be useful to have a `nextmap` ACS function alternative if `map` and `changemap` receive one.
(0022835)
WaTaKiD   
2023-04-30 23:38   
for completionism, theres also 'nextsecret'
(0022836)
DrinkyBird   
2023-05-01 15:12   
From what I can see, the only difference between the changemap command and ChangeLevel function is that the former waits for the survival countdown to end first. If needed, could that not be emulated by GetGameModeState?

And the only difference between the nextmap/nextsecret commands and the Exit_Normal/Exit_Secret specials is that the former throws an error if the next map doesn't exist.
(0022837)
Trillster   
2023-05-01 19:01   
I actually had not known that Exit_Normal and Exit_Secret existed, I would imagine those would suffice for my purposes. However, for ChangeLevel, I have noticed in the past when trying to use it in lieu of ConsoleCommand("changemap") that it sometimes would not properly mark maps as used/current in the map rotation.

For context, I use ConsoleCommand("changemap") for an addon that allows players to vote for the next map, changing the map during the results sequence instead of letting the engine handle it. From my experience, substituting ChangeLevel into that spot sometimes results in weird scenarios where the current map is not marked green or later as invalid when using GetMapRotationInfo.

It may warrant further investigation to just make sure that issue gets fixed, but I'm not entirely sure how to make a minimum example file in this case, since the issue appears randomly it would seem.