# HG changeset patch # User Adam Kaminski # Date 1630890754 14400 # Sun Sep 05 21:12:34 2021 -0400 # Node ID af0ad1affaf8fc12129e588eda5fac98cff626e1 # Parent f7d4ed7cb0e398723954a92c1fa4d9aa22a59484 When telling clients to add a map to the rotation, the position should be sent as a short, not as a byte, in case map lists are larger than 255 maps. diff -r f7d4ed7cb0e3 -r af0ad1affaf8 src/cl_main.cpp --- a/src/cl_main.cpp Sun Sep 05 16:23:03 2021 -0400 +++ b/src/cl_main.cpp Sun Sep 05 21:12:34 2021 -0400 @@ -2303,7 +2303,7 @@ case UPDATE_MAPROTATION_ADDMAP: { const char *pszMapName = pByteStream->ReadString(); - int position = pByteStream->ReadByte(); + int position = pByteStream->ReadShort(); ULONG ulMinPlayers = pByteStream->ReadByte(); ULONG ulMaxPlayers = pByteStream->ReadByte(); MAPROTATION_AddMap( pszMapName, position, ulMinPlayers, ulMaxPlayers, true ); diff -r f7d4ed7cb0e3 -r af0ad1affaf8 src/sv_commands.cpp --- a/src/sv_commands.cpp Sun Sep 05 16:23:03 2021 -0400 +++ b/src/sv_commands.cpp Sun Sep 05 21:12:34 2021 -0400 @@ -5011,7 +5011,7 @@ NetCommand command ( SVC2_UPDATEMAPROTATION ); command.addByte( UPDATE_MAPROTATION_ADDMAP ); command.addString( pszMapName ); - command.addByte( position ); + command.addShort( position ); command.addByte( ulMinPlayers ); command.addByte( ulMaxPlayers ); command.sendCommandToClients( ulPlayerExtra, flags );