From 9dcb12131b3822def203abcfcbc79ac6d934049b Mon Sep 17 00:00:00 2001 From: "NG (Graham)" Date: Wed, 3 Sep 2025 21:45:53 -0400 Subject: [PATCH] Make end of match return you to the main menu slightly faster after clicking the button --- rc_multiplayer/src/matches/generic.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rc_multiplayer/src/matches/generic.rs b/rc_multiplayer/src/matches/generic.rs index 6661c32..b29de1e 100644 --- a/rc_multiplayer/src/matches/generic.rs +++ b/rc_multiplayer/src/matches/generic.rs @@ -377,6 +377,15 @@ impl GenericGamemodeEngine { &rlnl::events::ingame::PlayerId { player: player_id }, true, ).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; for user in self.users.read().await.values() {