From 9ae166e78fb751186de8986f042fb02d112d51f6 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Wed, 1 Nov 2023 20:06:23 +0100 Subject: disconnect and reconnect working --- include/players.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/players.h') diff --git a/include/players.h b/include/players.h index 99b230f..0c7433e 100644 --- a/include/players.h +++ b/include/players.h @@ -9,6 +9,7 @@ #include "math_helper.h" #include "guns.h" #include "sprite.h" +#include "../include/players.h" #define MAX_PLAYERS 10 @@ -49,6 +50,7 @@ typedef struct t_player { u64 ping; sprite sprite; vec3f velocity; + network_state connection_state; } player; #include "protocol.h" @@ -68,5 +70,7 @@ float get_player_size(platform_window* window); void move_user(platform_window* window, u32 id, protocol_move_type move, float delta); void update_players_server(); void spawn_player(u32 id, network_client client); +bool player_has_old_session(u32 id); +void rejoin_player(u32 id, network_client client); #endif \ No newline at end of file -- cgit v1.2.3-70-g09d2