disband spectator teams when primary players go to results screen

This commit is contained in:
Martin Michelsen
2023-09-15 20:18:52 -07:00
parent 9cef4a14f8
commit 5caa21bccb
4 changed files with 18 additions and 10 deletions
+1 -8
View File
@@ -250,14 +250,7 @@ void ServerState::remove_lobby(uint32_t lobby_id) {
}
l->watched_lobby.reset();
} else {
// Tell all players in all spectator teams to go back to the lobby
for (auto watcher_l : l->watcher_lobbies) {
if (!watcher_l->is_ep3()) {
throw logic_error("spectator team is not an Episode 3 lobby");
}
l->log.info("Disbanding watcher lobby %" PRIX32, watcher_l->lobby_id);
send_command(watcher_l, 0xED, 0x00);
}
send_ep3_disband_watcher_lobbies(l);
}
l->log.info("Deleted lobby");