summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2023-11-02 18:42:02 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2023-11-02 18:42:02 +0100
commit2b9b3e78d9d448e4dfb4eaaa87b5f290ebee9cff (patch)
treeb2c1ccec5c03e69d4c709634184942ef39ebffca /src/game.c
parent11fc04b238ff9d42b17e6befa6ab4a673606fc1a (diff)
zombie chunks on server side
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
index df65282..d32b023 100644
--- a/src/game.c
+++ b/src/game.c
@@ -231,6 +231,7 @@ void update_server(platform_window* window) {
broadcast_to_clients(create_protocol_bullets_list());
broadcast_to_clients(create_protocol_drop_list());
broadcast_to_clients(create_protocol_throwables_list());
+ broadcast_to_clients(create_protocol_zombie_chunk_list());
// play sounds locally and send them to clients.
play_sounds_in_queue();
@@ -292,6 +293,11 @@ void update_client(platform_window* window) {
memcpy(zombies, msg_zombies->zombies, sizeof(zombies));
} break;
+ case MESSAGE_ZOMBIE_CHUNK_LIST: {
+ protocol_zombie_chunk_list* msg_zombies = (protocol_zombie_chunk_list*)msg;
+ memcpy(zombie_chunks, msg_zombies->zombie_chunks, sizeof(zombie_chunks));
+ } break;
+
case MESSAGE_THROWABLES_LIST: {
protocol_throwables_list* msg_throwables = (protocol_throwables_list*)msg;
memcpy(throwables, msg_throwables->throwables, sizeof(throwables));