summaryrefslogtreecommitdiff
path: root/src/throwables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/throwables.c')
-rw-r--r--src/throwables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/throwables.c b/src/throwables.c
index b6780d3..a950080 100644
--- a/src/throwables.c
+++ b/src/throwables.c
@@ -71,8 +71,8 @@ bool check_if_throwable_collided_with_object(throwable* b, vec3f oldpos, vec3f n
for (int i = 0; i < MAX_OBJECTS; i++) {
object o = loaded_map.objects[i];
if (!o.active) continue;
- if (b->position.z <= o.h + o.size.z && b->position.z >= o.h) {
- box obj_box = get_box_of_square((vec3f){o.position.x, o.position.y, o.h}, o.size);
+ 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);
// top
if (lines_intersect((vec2f){.x = oldpos.x, .y = oldpos.y}, (vec2f){.x = newpos.x, .y = newpos.y},