summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-05-16 21:33:23 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-05-16 21:33:23 +0200
commit37ff88d1631bfbd231b3d93f3401f3d70a750b45 (patch)
treeaf6bbc21a9e454ab5a9778135470cc842b557b2d /src
parent250361975fc81ca01d96f615ed1226641887c305 (diff)
temp
Diffstat (limited to 'src')
-rw-r--r--src/bullets.c1
-rw-r--r--src/zombies.c4
2 files changed, 3 insertions, 2 deletions
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);
}
}