aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-04 21:16:56 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-04 21:16:56 +0200
commit5063701929569fe37ca4b8659bd52981f8e7b77c (patch)
treea9a5825fca679d4cfec24bdc16f583fc364d8c52
parenta2f8ff265924d039cff58308993a0f838c7c407b (diff)
downloadgpn-tron-rust-5063701929569fe37ca4b8659bd52981f8e7b77c.tar
gpn-tron-rust-5063701929569fe37ca4b8659bd52981f8e7b77c.tar.bz2
gpn-tron-rust-5063701929569fe37ca4b8659bd52981f8e7b77c.tar.zst
send each player their **own** id.
-rw-r--r--src/game/server.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/server.rs b/src/game/server.rs
index 0e983b9..2cc5d43 100644
--- a/src/game/server.rs
+++ b/src/game/server.rs
@@ -143,7 +143,7 @@ async fn handle_tick(
let g = state.game.read().await;
if new_game {
events.push(Packet::Game {
- my_id: 0,
+ my_id: pid,
width: g.map.size.x as usize,
height: g.map.size.y as usize,
});