summaryrefslogtreecommitdiffhomepage
path: root/editor/scenery-editor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-01 12:32:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-01 12:32:37 +0100
commit7ebee3863c061b1d0b64839b56bbc70ff4e5d924 (patch)
treeac0356bdcbf9f77864cb2cb2a6b5f2798c6fb3db /editor/scenery-editor.cpp
parent078c376b6255fb6fd24362b27862819444327265 (diff)
move scenery modify logic to scenery_ref
Diffstat (limited to 'editor/scenery-editor.cpp')
-rw-r--r--editor/scenery-editor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp
index f9a0678e..1d0635a6 100644
--- a/editor/scenery-editor.cpp
+++ b/editor/scenery-editor.cpp
@@ -3,6 +3,7 @@
#include "loader/loader.hpp"
#include "compat/assert.hpp"
#include "src/world.hpp"
+#include "rotation.inl"
namespace floormat {
@@ -21,7 +22,10 @@ scenery_editor::scenery_editor() noexcept
void scenery_editor::set_rotation(rotation_ r)
{
- _selected.proto.frame.rotate(r);
+ auto& s = _selected.proto.frame;
+ s.bbox_offset = rotate_point(s.bbox_offset, s.r, r);
+ s.bbox_size = rotate_size(s.bbox_size, s.r, r);
+ s.r = r;
}
rotation_ scenery_editor::rotation() const