forked from ddnet/ddnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List available maps as console arguments for
sv_map
/change_map
Send list of all maps available in the `maps` folder on the server to authed clients that have access to the `sv_map` or `change_map` command, so the maps can be shown as console arguments for these commands. Progress of maplist sending is shown similar to rcon command sending progress. The maplist sending is implemented similar to the rcon command sending. Each tick the maplist for one particular client is updated. The maplist will be sent only after all rcon commands have been sent. The server will send the following new system messages: - `NETMSG_MAPLIST_ADD`: Contains 1 or more map names as strings which should be added to the list of maps in the given order. To reduce overhead and make the maplist sending significantly faster (since it is currently bound to server ticks) this message contains as many strings as possible (with some leeway for protocol overhead). The client is expected to unpack as many strings as possible from the message. - `NETMSG_MAPLIST_GROUP_START`: Indicates the start of maplist sending. Contains an integer that specifies the number of expected maplist entries for progress reporting. The previous maplist should be cleared when receiving this message. - `NETMSG_MAPLIST_GROUP_END`: Indicates the end of maplist sending. The server sorts the maplist after initializing it and sends the entries in order. Clients therefore do not need to perform their own sorting of the maplist. The maplist is initialized when starting the server. The command `reload_maplist` is added to reload the maplist manually. When the maplist is reloaded, the server will resend the maplist to clients that already received it or are currently receiving it. This does not include handling for the `access_level` command being used to change the access level for the `sv_map` or `change_map` command after a client has already logged in. Active maplist sending will not be canceled if the access level for all map commands is removed and it will not be started if access to a map command is granted while already logged in. Clients can logout and login again to get the updated maplist instead. This does not include support for the 0.7 maplist protocol. Closes ddnet#5727.
- Loading branch information
Showing
8 changed files
with
283 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.