diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 14:50:52 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 14:50:52 +0200 |
| commit | 7d87e8e3e9eccbb3ae351f3218276b2dae506665 (patch) | |
| tree | 2a38f9ba83bb66c9e85b67aa7a18c4a4942e8d1f /include | |
| parent | 5de0682c37fc8e9713bb566a637f19a3795abc4a (diff) | |
fix issue with sprites
Diffstat (limited to 'include')
| -rw-r--r-- | include/audio.h | 5 | ||||
| -rw-r--r-- | include/protocol.h | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/audio.h b/include/audio.h index 92d460c..b4657d7 100644 --- a/include/audio.h +++ b/include/audio.h @@ -19,8 +19,9 @@ typedef struct t_audio_event { vec3f position; } audio_event; -audio_event audio_events[20] = {0}; -int max_audio_events = 20; +#define MAX_AUDIO_EVENTS 20 +audio_event audio_events[MAX_AUDIO_EVENTS] = {0}; +int max_audio_events = MAX_AUDIO_EVENTS; void add_audio_event_to_queue(audio_event_type event, u32 playerid, vec3f position); void play_sounds_in_queue(); diff --git a/include/protocol.h b/include/protocol.h index 9750d62..329810c 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -17,6 +17,7 @@ typedef enum t_network_message_type MESSAGE_USER_SHOOT, MESSAGE_BULLET_LIST, MESSAGE_DROP_LIST, + MESSAGE_SOUND_LIST, } network_message_type; typedef struct t_protocol_generic_client_message @@ -49,6 +50,13 @@ typedef struct t_protocol_user_list player players[MAX_PLAYERS]; } protocol_user_list; +#include "audio.h" +typedef struct t_protocol_sound_list +{ + network_message_type type; + audio_event audio_events[MAX_AUDIO_EVENTS]; +} protocol_sound_list; + #include "zombies.h" typedef struct t_protocol_zombie_list { @@ -118,6 +126,7 @@ allocator outgoing_allocator; network_message create_protocol_get_id_up(u32 id); network_message create_protocol_get_id_down(u32 id); +network_message create_protocol_sound_list(); 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); |
