From 95416b2cfc81959dd332b163da3208ca70971b2c Mon Sep 17 00:00:00 2001 From: thelinkin3000 Date: Sun, 4 Oct 2026 23:37:36 +0000 Subject: [PATCH] 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 --- source/interface/ui_widget_event_handler_functions.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/interface/ui_widget_event_handler_functions.c b/source/interface/ui_widget_event_handler_functions.c index 87f3b410..11108256 100644 --- a/source/interface/ui_widget_event_handler_functions.c +++ b/source/interface/ui_widget_event_handler_functions.c @@ -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); }