diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 13:33:15 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-12-24 13:33:15 +0100 |
| commit | 03930634b437dc390354accd30563050d681a08d (patch) | |
| tree | 94070275ab4f105eadba830e9d4ac79b8a32e2f1 /src/throwables.c | |
| parent | eefc69b2c3816ed4c97bf976b7373175b8e7343d (diff) | |
editor work
Diffstat (limited to 'src/throwables.c')
| -rw-r--r-- | src/throwables.c | 4 |
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}, |
