summaryrefslogtreecommitdiff
path: root/include/players.h
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-14 20:43:26 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-14 20:43:26 +0100
commit23d2cc231e5b4c015a8471d3035dc07802de23d5 (patch)
tree4b307a81e5fc566a5d1af9a0659b19534cff11b6 /include/players.h
parentee4906ef5fc89f3f10cd6aaf95845a0ae9b2f47e (diff)
leaderboard, network syncing
Diffstat (limited to 'include/players.h')
-rw-r--r--include/players.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/players.h b/include/players.h
index 258a1fb..e51e4e2 100644
--- a/include/players.h
+++ b/include/players.h
@@ -21,6 +21,7 @@ typedef struct t_player {
int total_ammo;
int ammo_in_mag;
gun_type guntype;
+ network_client client; // For the host: is_connected = false and socket = 0
} player;
#include "protocol.h"
@@ -32,6 +33,7 @@ camera _next_camera_pos;
int max_players = 10;
player players[10] = {0};
+int get_player_count();
player* get_player_by_id(u32 id);
void draw_players_at_tile(platform_window* window, int x, int y);
void draw_bullets(platform_window* window);
@@ -39,5 +41,6 @@ object check_if_player_collided_with_object(platform_window* window, player p);
float get_player_size(platform_window* window);
void move_user(platform_window* window, u32 id, protocol_move_type move);
void update_players_server();
+void spawn_player(int id, network_client client);
#endif \ No newline at end of file