From 2b9b3e78d9d448e4dfb4eaaa87b5f290ebee9cff Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 2 Nov 2023 18:42:02 +0100 Subject: zombie chunks on server side --- src/game.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game.c') 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)); -- cgit v1.2.3-70-g09d2