Skip to content

Fix null NextLevel#40

Merged
Oz-Lin merged 6 commits into
Oz-Lin:mainfrom
Letaryat:main
Sep 23, 2025
Merged

Fix null NextLevel#40
Oz-Lin merged 6 commits into
Oz-Lin:mainfrom
Letaryat:main

Conversation

@Letaryat

@Letaryat Letaryat commented Aug 26, 2025

Copy link
Copy Markdown
  • Probably fixed null nextlevel so it wont randomly change map to null even on custom gamemode (and I think without gamemode_servers.txt as well),
  • Added a RegisterEventHandler for EventCsWinPanelMatch so when match is ended and voting is still going it will automatically end voting and select a next map,
  • Added a really small feature that will execute server command: mp_pause_match for EndOfMapVote when enabled in config, When EndOfMapVote is ended it executes mp_unpause_match.

Plugin was tested only with bots so I am not sure if everything is perfect but when tested seemed okay.

- Added Server.ExecuteCommand nextlevel to some places so map will not be null.
- Added new event: EventCsWinPanelMatch so if the vote is still going it should end and set nextlevel as well to the random one or the one that won.
- Removed my vulgar debugging server.printtochat
- Added possibility to pause match when EndOfMapVote is going. (PrintToCenter is a little bit bugged then but other than that it works)
@Letaryat

Copy link
Copy Markdown
Author

As onemore said on discord thread:

nextlevel works with classic maps and maps you added to a Workshop collection assigned to the server. Workshop collection has a limit of about 100 maps. So if you want to add more workshop maps to your server, the nextlevel will not work with workshop maps which are not in the collection

"My fix" works with maps that are on the server either as a default CS2 maps or when they were downloaded from workshop collection.
Because of that, probably it would be easier to use method ChangeNextMap from changeMapManager at the EventCsWinPanelMatch in EndOfMapVote.cs but not sure if I can do that and create PR.

@Oz-Lin

Oz-Lin commented Aug 26, 2025

Copy link
Copy Markdown
Owner

Thanks, I will have a look after work

@Oz-Lin Oz-Lin merged commit bba6dba into Oz-Lin:main Sep 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants