Make end of match return you to the main menu slightly faster after clicking the button

This commit is contained in:
NG (Graham) committed 2025-09-03 21:45:53 -04:00
1 parent e9a4830562
commit 9dcb12131b
1 file changed
+9
+9
View File
@@ -377,6 +377,15 @@ impl <L: super::CustomGameLogic> GenericGamemodeEngine<L> {
&rlnl::events::ingame::PlayerId { player: player_id }, &rlnl::events::ingame::PlayerId { player: player_id },
true, true,
).await; ).await;
} else {
// in every other case this packet would've already been sent
// this makes the end-of-match "continue" button send you back to the main menu a bit sooner
// (otherwise it waits for the multiplayer server to disconnect via timeout)
crate::events::log_lnl_send_failure(conn.connection.rlnl().send_empty(
rlnl::event_code::NetworkEvent::PlayerQuitRequestComplete,
literustlib::packet::Property::ReliableOrdered,
&conn.connection.connection,
).await);
} }
let mut has_active_connections = false; let mut has_active_connections = false;
for user in self.users.read().await.values() { for user in self.users.read().await.values() {