summaryrefslogtreecommitdiffhomepage
path: root/editor/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/camera.cpp')
-rw-r--r--editor/camera.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp
index 89147946..dfe985b4 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -102,15 +102,15 @@ object_id app::get_object_colliding_with_cursor()
object_id ret = 0;
rtree->Search(t0.data(), t1.data(), [&](uint64_t data, const rect_type& rect) {
[[maybe_unused]] auto x = std::bit_cast<collision_data>(data);
- if (x.tag == (uint64_t)collision_type::geometry)
+ if (x.type == (uint64_t)collision_type::geometry)
return true;
- Vector2 min(rect.m_min[0], rect.m_min[1]), max(rect.m_max[0], rect.m_max[1]);
+ Vector2 min{rect.m_min}, max{rect.m_max};
if (t0 >= min && t0 <= max)
{
- if (auto e_ = world.find_object(x.data);
+ if (auto e_ = world.find_object(x.id);
e_ && Vector2ui(e_->bbox_size).product() != 0)
{
- ret = x.data;
+ ret = x.id;
return false;
}
}