diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-11-02 18:24:46 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-11-02 18:24:46 +0100 |
| commit | 11fc04b238ff9d42b17e6befa6ab4a673606fc1a (patch) | |
| tree | cf4f48820fe3c55ed98c39038352924fab682ca8 /include/protocol.h | |
| parent | 0648e9ec83977fe5151896097afd1dbae3f4143b (diff) | |
throwables on server side
Diffstat (limited to 'include/protocol.h')
| -rw-r--r-- | include/protocol.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/protocol.h b/include/protocol.h index 329810c..e0c47c6 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -13,11 +13,13 @@ typedef enum t_network_message_type MESSAGE_USER_LIST, MESSAGE_USER_MOVED, MESSAGE_USER_LOOK, + MESSAGE_USER_THROW, MESSAGE_ZOMBIE_LIST, MESSAGE_USER_SHOOT, MESSAGE_BULLET_LIST, MESSAGE_DROP_LIST, MESSAGE_SOUND_LIST, + MESSAGE_THROWABLES_LIST, } network_message_type; typedef struct t_protocol_generic_client_message @@ -87,6 +89,15 @@ typedef struct t_protocol_move float delta; } protocol_move; +typedef struct t_protocol_user_throw +{ + network_message_type type; + u32 id; + float dirx; + float diry; + throwable_type throwable; +} protocol_user_throw; + typedef struct t_protocol_user_look { network_message_type type; @@ -103,6 +114,12 @@ typedef struct t_protocol_bullets_list bullet bullets[500]; } protocol_bullets_list; +typedef struct t_protocol_throwables_list +{ + network_message_type type; + throwable throwables[50]; +} protocol_throwables_list; + typedef struct t_protocol_user_shoot { network_message_type type; @@ -131,9 +148,11 @@ network_message create_protocol_user_list(); network_message create_protocol_user_moved(protocol_move_type move, u32 id); network_message create_protocol_user_look(u32 id, float gunx, float guny); network_message create_protocol_user_shoot(u32 id, float dirx, float diry); +network_message create_protocol_user_throw(u32 id, float dirx, float diry, throwable_type type); network_message create_protocol_zombie_list(); network_message create_protocol_bullets_list(); network_message create_protocol_drop_list(); +network_message create_protocol_throwables_list(); array messages_received_on_server; array messages_received_on_client; |
