diff options
Diffstat (limited to 'include/players.h')
| -rw-r--r-- | include/players.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/players.h b/include/players.h index a6b1745..a41b246 100644 --- a/include/players.h +++ b/include/players.h @@ -12,6 +12,7 @@ #include "../include/players.h" #define MAX_PLAYERS 10 +#define MAX_POINT_ANIMATIONS 10 typedef enum t_player_interact_state { INTERACT_IDLE, @@ -29,6 +30,16 @@ typedef enum t_player_direction { DIRECTION_BOTTOMRIGHT, } player_direction; +typedef struct t_point_animation +{ + bool active; + u32 points; + float diry; + vec2f position; + float sec_alive; + float opacity; +} point_animation; + typedef struct t_player { u32 id; bool active; @@ -52,12 +63,16 @@ typedef struct t_player { u64 ping; sprite sprite; network_state connection_state; + u32 points; struct { int grenades; int molotovs; } throwables; + point_animation point_animations[MAX_POINT_ANIMATIONS]; } player; + + #include "protocol.h" u32 player_id = -1; // Session id on current server. @@ -79,5 +94,7 @@ bool player_has_old_session(u32 id); void rejoin_player(u32 id, network_client client); char* get_player_name_by_player_index(int index); color get_color_tint_by_player_index(int index); +void add_points_to_player(player* p, u32 points); +void update_points_animation_server(); #endif
\ No newline at end of file |
