diff options
| -rw-r--r-- | editor/draw.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp index 051583d1..d0aa82b8 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -135,15 +135,14 @@ void app::draw_collision_boxes() const auto* rtree = c.rtree(); rtree->Search(min2f, max2f, [&](object_id data, const rect_type& rect) { [[maybe_unused]] auto x = std::bit_cast<collision_data>(data); -#if 0 // todo! +#if 0 if (x.tag == (uint64_t)collision_type::geometry) return true; -#else +#endif if (x.tag == (uint64_t)collision_type::geometry) if (x.pass == (uint64_t)pass_mode::pass) if (x.data < TILE_COUNT*2+1) return true; -#endif Vector2 start(rect.m_min[0], rect.m_min[1]), end(rect.m_max[0], rect.m_max[1]); auto size = (end - start); auto center = Vector3(start + size*.5f, 0.f); @@ -183,8 +182,14 @@ void app::draw_collision_boxes() const auto* rtree = c.rtree(); rtree->Search(t0.data(), t1.data(), [&](uint64_t data, const rect_type& rect) { [[maybe_unused]] auto x = std::bit_cast<collision_data>(data); +#if 0 if (x.tag == (uint64_t)collision_type::geometry) return true; +#endif + if (x.tag == (uint64_t)collision_type::geometry) + if (x.pass == (uint64_t)pass_mode::pass) + if (x.data < TILE_COUNT*2+1) + return true; Vector2 start(rect.m_min[0], rect.m_min[1]), end(rect.m_max[0], rect.m_max[1]); auto size = end - start; auto center = Vector3(start + size*.5f, 0.f); |
