Zero player on fresh connection

main
Cameron Murphy Reikes 2 years ago
parent 261f602afe
commit 6a38a7c3dd

@ -154,8 +154,6 @@ static void frame(void)
process(&gs, (float)sapp_frame_duration()); process(&gs, (float)sapp_frame_duration());
} }
// drawing // drawing
{ {
sgp_begin(width, height); sgp_begin(width, height);

@ -92,6 +92,7 @@ void server(void *data)
else else
{ {
event.peer->data = (void *)player_slot; event.peer->data = (void *)player_slot;
gs.players[player_slot] = (struct Player){ 0 };
gs.players[player_slot].connected = true; gs.players[player_slot].connected = true;
} }

Loading…
Cancel
Save