Make a new game each time Create is chosen

Backing out of a hosted game keeps its server: the lobby's last local
player leaving pauses it (netgame_unjoin_player). Choosing Create again
threw the host's client away, but network_game_start_new_server makes and
joins a server only when there is none, so the new client never joined the
one left over. The lobby then had nobody in it: START added no player, B
could not leave (not in pregame), and the server's map changes failed to
reach the client that was gone.

Create now disposes the client and server first, so it always makes a new
game and joins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
thelinkin3000andClaude Opus 5.5 committed 2026-10-04 23:37:36 +00:00
1 parent ffc1512dcb
commit 95416b2cfc
1 file changed
+7 -1
@@ -5960,12 +5960,18 @@ boolean ui_widget_port_gametype_choose(
return TRUE;
}
/* hosting (as the Xbox's server list's Y) */
/* hosting (as the Xbox's server list's Y): always a new game. A game made
before and backed out of keeps its server (the lobby's last player leaving
pauses it: netgame_unjoin_player), and network_game_start_new_server joins
only a server it makes, so the client it made for that one never joined it
and the lobby had nobody in it */
boolean ui_widget_port_host(
struct widget_instance *widget,
struct event_record *event,
boolean *widget_deleted)
{
dispose_global_network_game_client();
dispose_global_network_game_server();
return network_game_start_new_server(widget, event, widget_deleted);
}