-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More map system updates + misc dev #339
Open
Vauff
wants to merge
27
commits into
main
Choose a base branch
from
mapsystem-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,474
−888
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I should've just committed to this in the previous map system updates, but foolishly tried to keep the old setup in place, and just complicated the code in the process
Though less complex, it also had a similar setup to !nominate
- Now fully within map vote system, for simplicity sake - Fixed not being able to use substrings of default maps defined in maplist.cfg - Fixed map change prints using substrings instead of full map names - Added colour formatting
Sets us up for a good group cooldown format Additionally: - Fixed ZR crashing if player class config JSON parsing failed - Fixed c_reload_map_list crashing if loading map list failed
- Added nomination status messages when vote starts - Migrated nomination handling code to std containers - Added a shared function for gathering nominations
I can't come up with a good reason why ID ordering was even needed (not added by me). Additionally, support for default maps (with no ID) was added in the time since, so not really sure this makes sense anymore.
- Added cs2f_vote_max_maps cvar to control total amount of maps in vote - Disabled map vote UI if a next map is forced - Disabled map vote UI if mp_endmatch_votenextmap is disabled - Fixed map vote breaking when not enough maps are available - Added min/max clamp to cs2f_vote_max_nominations cvar - Fixed regressions with current map detection from previous commit
Also remove endmatch_mapvote_selecting_map, this event never actually fires
- Switched to time-based cooldowns, more predictable over long periods of time (maps being rtv'd/extended) - Fixed maps not going on cooldown if map change happened outside of a map vote - Added cooldown tracking for maps not in maplist.cfg, allowing the cooldown to be used if added later
g_pNetworkGameServer gets free'd by the game pre-OnLevelShutdown, so in the period up until StartupServer, we were storing a bad pointer. The engine's GetIGameServer() function always returns a nullptr in this state we can check for, so we just always call it directly now.
GetClientList apparently depends on the type being correct
Same deal as g_pNetworkGameServer, it gets free'd by the game between map changes
Vauff
changed the title
More map system updates + bit of misc dev
More map system updates + misc dev
Jan 30, 2025
For gamerules, we have to null our own definition, since no getter is available from the game
Is there plans for maplife.jsonc to just pull the maps from the collection ID? |
No, we dropped the idea of syncing with collections ever since the 100 map limit bug in CS2 was found. Also, it wouldn't really make sense to do so anymore given all the additional config options that can only be defined in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
maplist.cfg
will be auto-converted tomaplist.jsonc
maplist_old.cfg
in case something goes wrongc_reload_map_list
crashing if loading map list failedcs2f_vote_max_maps
cvar to control total amount of maps in votemp_endmatch_votenextmap
is disabledcs2f_vote_max_nominations
cvarcs_win_panel_match
event listener toevents.cpp
This is the promised follow up to #327, but yet again, there are still a few more changes I want to do in a later PR. However, the map system is in a very good place now, and I probably won't work on it again for a while.