diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 17:48:34 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 17:48:34 +0100 |
| commit | b426d61f903fa4dd635fb525eb4c28ca1c1d1929 (patch) | |
| tree | b941499890be0698f3138866c94677a86fcd59e6 /editor | |
| parent | a418f0571231a429b8e0adfea7e09c2f81856a57 (diff) | |
src: fix scenery mesh modified marking
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/scenery-editor.cpp | 3 | ||||
| -rw-r--r-- | editor/update.cpp | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp index 22a7fd16..45dd0288 100644 --- a/editor/scenery-editor.cpp +++ b/editor/scenery-editor.cpp @@ -96,11 +96,8 @@ void scenery_editor::place_tile(world& w, global_coords pos, const scenery_& s) } } else - { // todo check collision at pos w.make_entity<scenery>(w.make_id(), pos, s.proto); - } - c.mark_scenery_modified(); } } // namespace floormat diff --git a/editor/update.cpp b/editor/update.cpp index 7c084a85..e9570208 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -108,11 +108,7 @@ void app::do_rotate(bool backward) { auto& e = *cl->e; auto r = backward ? e.atlas->prev_rotation_from(e.r) : e.atlas->next_rotation_from(e.r); - if (r != e.r) - { - e.rotate(e.index(), r); - e.chunk().mark_scenery_modified(); - } + e.rotate(e.index(), r); } } } @@ -211,7 +207,7 @@ void app::set_cursor() { if (!cursor.in_imgui) { - if (auto* cl = find_clickable_scenery(cursor.pixel)) + if ([[maybe_unused]] auto* cl = find_clickable_scenery(cursor.pixel)) M->set_cursor(std::uint32_t(Cursor::Hand)); else M->set_cursor(std::uint32_t(Cursor::Arrow)); |
