From 37ff88d1631bfbd231b3d93f3401f3d70a750b45 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 16 May 2024 21:33:23 +0200 Subject: temp --- src/bullets.c | 1 + src/zombies.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bullets.c b/src/bullets.c index 7517949..4de760d 100644 --- a/src/bullets.c +++ b/src/bullets.c @@ -98,6 +98,7 @@ object_type check_if_bullet_collided_with_object(bullet* b, platform_window* win for (int i = 0; i < MAX_OBJECTS; i++) { object o = loaded_map.objects[i]; if (!o.active) continue; + if (!o.collision) continue; if (b->position.z <= o.position.z + o.size.z && b->position.z >= o.position.z) { box obj_box = get_box_of_square((vec3f){o.position.x, o.position.y, o.position.z}, o.size); vec2f intersect_point; diff --git a/src/zombies.c b/src/zombies.c index 9c38411..6c87098 100644 --- a/src/zombies.c +++ b/src/zombies.c @@ -316,7 +316,7 @@ static vec2f get_direction_to_next_tile(zombie o) { } static bool is_within_tile(zombie o, vec2f dest) { - if (fabs(o.position.x - dest.x) < 0.05f && fabs(o.position.y - dest.y) < 0.05f) { + if (fabs(o.position.x - dest.x) < 0.05f && fabs(o.position.y - dest.y) < 0.1f) { return true; } return false; @@ -529,7 +529,7 @@ void draw_zombies(platform_window* window, uint32_t ystart, uint32_t yend) { renderer->render_rectangle(zombie_pos.x + (zombie_size/2) - (bar_w/2), zombie_pos.y - bar_h, bar_w*percentage, bar_h, rgb(100,0,0)); } - //if (global_state.server) draw_path_of_zombie(window, o); + if (global_state.server) draw_path_of_zombie(window, o); } } -- cgit v1.2.3-70-g09d2