From 6a38a7c3dd37a6546e01287a8ae62fa9572b52d8 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Wed, 12 Oct 2022 14:34:00 -0700 Subject: [PATCH] Zero player on fresh connection --- main.c | 2 -- server.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/main.c b/main.c index d388fff..0f49c1b 100644 --- a/main.c +++ b/main.c @@ -154,8 +154,6 @@ static void frame(void) process(&gs, (float)sapp_frame_duration()); } - - // drawing { sgp_begin(width, height); diff --git a/server.c b/server.c index 3a343d6..c0e44ce 100644 --- a/server.c +++ b/server.c @@ -92,6 +92,7 @@ void server(void *data) else { event.peer->data = (void *)player_slot; + gs.players[player_slot] = (struct Player){ 0 }; gs.players[player_slot].connected = true; }