diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-11 16:32:33 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-11 16:32:33 +0200 |
| commit | 28bf7168e633629a6a049f639950a30f26102f40 (patch) | |
| tree | 2caa6d5d68ebc2228409d32f8c1bd61fa8e81c16 /src/objects.c | |
| parent | a50de53da1dc128ffbcdacba28353fe0825c4ac9 (diff) | |
automatic door
Diffstat (limited to 'src/objects.c')
| -rw-r--r-- | src/objects.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/objects.c b/src/objects.c index c1caad7..e551544 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1,5 +1,6 @@ #include "../include/objects.h" #include "../include/wall_item.h" +#include "../include/glass_doors.h" box get_box_of_object(platform_window* window, object o) { return get_render_box_of_square(window, (vec3f){o.position.x, o.position.y, o.position.z}, o.size); @@ -132,6 +133,8 @@ void draw_objects(platform_window* window) { for (int i = 0; i < MAX_OBJECTS; i++) { if (!loaded_map.objects[i].active) continue; object o = loaded_map.objects[i]; + + if (o.type == OBJECT_GLASS_DOOR_H) continue; box box = get_box_of_object(window, o); @@ -149,6 +152,7 @@ void draw_objects(platform_window* window) { if (!is_editing_map) #endif draw_players(window, prev_y, prev_y); + draw_glass_doors(window, prev_y, prev_y); } } @@ -157,6 +161,7 @@ void draw_objects(platform_window* window) { if (!is_editing_map) #endif draw_players(window, prev_y, MAP_SIZE_Y); + draw_glass_doors(window, prev_y, MAP_SIZE_Y); } void create_objects() { |
