From dda7cfb99e9e8664878bcd38e3d3392b544c3343 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 29 Oct 2023 09:40:38 +0100 Subject: grenade explosion --- include/throwables.h | 3 +++ include/zombies.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/throwables.h b/include/throwables.h index 2106c94..0d227d9 100644 --- a/include/throwables.h +++ b/include/throwables.h @@ -30,8 +30,11 @@ typedef struct t_throwable { float alive_time; int bounces; sprite sprite; + int damage; } throwable; +vec3f grenade_explosion_size = (vec3f){2.0f, 2.0f, 2.0f}; + throwable throwables[500] = {0}; int max_throwables = 500; diff --git a/include/zombies.h b/include/zombies.h index eeadaaf..b2aeb2a 100644 --- a/include/zombies.h +++ b/include/zombies.h @@ -39,6 +39,7 @@ spawner spawner_tiles[MAX_SPAWNERS] = {0}; #define SERVER_MAX_ZOMBIES (50) zombie zombies[SERVER_MAX_ZOMBIES] = {0}; +bool hit_zombie(int index, int damage); void create_spawner(vec2 position); void draw_spawners(platform_window* window); void draw_zombies(platform_window* window); -- cgit v1.2.3-70-g09d2