diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-24 08:51:25 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-07-27 12:33:03 +0200 |
| commit | 7508db41ed056a50b36656dd73aafcaa9e43f6e2 (patch) | |
| tree | e86ab0a9169c24cc157ca2df9185ab856c662fe7 /editor/camera.cpp | |
| parent | 52d691bf472f57670bc8c9140f35d562340bb894 (diff) | |
rename some collision_data members to be more descriptive
Diffstat (limited to 'editor/camera.cpp')
| -rw-r--r-- | editor/camera.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp index 89147946..df5b2cb5 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]); 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; } } |
