Command_Map_f: Respect value of splitplayers cvar

Permits testing multiple players in GP by your lonesome without having to manipulate multiple controllers at once.
This commit is contained in:
toaster 2023-02-16 15:28:31 +00:00
parent b2bd5ecccd
commit 97c8d201eb

View file

@ -2970,8 +2970,21 @@ static void Command_Map_f(void)
if (!Playing()) if (!Playing())
{ {
UINT8 ssplayers = cv_splitplayers.value-1;
multiplayer = true; multiplayer = true;
restoreMenu = NULL; restoreMenu = NULL;
strncpy(connectedservername, cv_servername.string, MAXSERVERNAME);
if (cv_maxconnections.value < ssplayers+1)
CV_SetValue(&cv_maxconnections, ssplayers+1);
if (splitscreen != ssplayers)
{
splitscreen = ssplayers;
SplitScreen_OnChange();
}
} }
} }