diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-18 17:41:50 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-18 17:41:50 +0100 |
| commit | 3e825971102a33dfbb82a20a365684d413bc1ba8 (patch) | |
| tree | 718bf8a802bf3631bee22ef33161dec8d68ed6cf /include/protocol.h | |
| parent | 9eefbb4afc9601024eac6191addd98e21f90a5b3 (diff) | |
refactor
Diffstat (limited to 'include/protocol.h')
| -rw-r--r-- | include/protocol.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/protocol.h b/include/protocol.h index 39e7d6a..8fd33b9 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -4,6 +4,7 @@ #include <projectbase/project_base.h> #include "list.h" +#include "players.h" typedef enum t_network_message_type { @@ -45,7 +46,7 @@ typedef struct t_protocol_get_id_downstream typedef struct t_protocol_user_list { network_message_type type; - player players[10]; + player players[MAX_PLAYERS]; } protocol_user_list; #include "zombies.h" @@ -104,7 +105,7 @@ typedef struct t_protocol_user_shoot typedef struct t_send_queue_entry { bool active; - network_client recipients[10]; + network_client recipients[MAX_PLAYERS]; network_message message; } send_queue_entry; @@ -132,6 +133,7 @@ array messages_received_on_client; mutex messages_to_send_queue_mutex; send_queue_entry messages_to_send_queue[OUTGOING_QUEUE_SIZE] = {0}; +void add_message_to_outgoing_queuex(network_message message, network_client c); void add_message_to_outgoing_queue(send_queue_entry entry); void* network_send_thread(void* args); |
