summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenery.cpp')
-rw-r--r--src/scenery.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/scenery.cpp b/src/scenery.cpp
index 86ebea73..f21f95c2 100644
--- a/src/scenery.cpp
+++ b/src/scenery.cpp
@@ -66,13 +66,15 @@ scenery::scenery(door_tag_t, const anim_atlas& atlas, rotation r, bool is_open,
void scenery_ref::rotate(rotation new_r)
{
- auto& s = frame;
- s.bbox_offset = rotate_point(s.bbox_offset, s.r, new_r);
- s.bbox_size = rotate_size(s.bbox_size, s.r, new_r);
- s.r = new_r;
+ c->with_scenery_bbox_update(idx, [&] {
+ auto& s = frame;
+ s.bbox_offset = rotate_point(s.bbox_offset, s.r, new_r);
+ s.bbox_size = rotate_size(s.bbox_size, s.r, new_r);
+ s.r = new_r;
+ });
}
-bool scenery_ref::can_activate() noexcept
+bool scenery_ref::can_activate() const noexcept
{
return frame.interactive;
}