Skip to content

Commit

Permalink
More pings before starting the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxxu committed Nov 4, 2024
1 parent 45a0f34 commit 122e944
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/client/src/lan/game/lobby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,24 @@ impl<'a> LobbyHandler<'a> {
return Ok(());
}
self.starting = true;

self.ping_and_await_pong().await?;

self
.stream
.send(Packet::simple(
self.info.slot_info.slot_info.clone() as flo_w3gs::protocol::slot::SlotInfo
)?)
.await?;

self.ping_and_await_pong().await?;

self.stream.send(Packet::simple(CountDownStart)?).await?;

self.ping_and_await_pong().await?;

sleep(Duration::from_secs(6)).await;

self.ping_and_await_pong().await?;

self.stream.send(Packet::simple(CountDownEnd)?).await?;
Expand Down

0 comments on commit 122e944

Please sign in to comment.