summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/draw.cpp4
-rw-r--r--editor/update.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index 2944eae6..6ee32738 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -66,7 +66,9 @@ void app::draw_cursor()
void app::draw_collision_boxes()
{
- const auto [z_min, z_max] = get_z_bounds();
+ auto [z_min, z_max, z_cur, only] = get_z_bounds();
+ if (only)
+ z_min = z_max = z_cur;
const auto [minx, maxx, miny, maxy] = M->get_draw_bounds();
const auto sz = M->window_size();
auto& world = M->world();
diff --git a/editor/update.cpp b/editor/update.cpp
index 9384cc17..d5eb2039 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -237,10 +237,7 @@ void app::set_cursor()
auto app::get_z_bounds() -> z_bounds
{
- if (_render_all_z_levels)
- return { chunk_z_min, chunk_z_max };
- else
- return { _z_level, _z_level };
+ return { chunk_z_min, chunk_z_max, _z_level, !_render_all_z_levels };
}
void app::update(float dt)