File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2496,6 +2496,8 @@ Player::on_flip(float height)
24962496 Vector pos = get_pos ();
24972497 pos.y = height - pos.y - get_bbox ().get_height ();
24982498 set_pos_reset (pos);
2499+
2500+ position_grabbed_object (true );
24992501}
25002502
25012503void
Original file line number Diff line number Diff line change 2020#include < simplesquirrel/vm.hpp>
2121
2222#include " editor/resize_marker.hpp"
23+ #include " object/portable.hpp"
2324#include " supertux/sector.hpp"
2425#include " util/reader_mapping.hpp"
2526#include " util/writer.hpp"
@@ -101,6 +102,11 @@ MovingObject::editor_select()
101102void
102103MovingObject::on_flip (float height)
103104{
105+ auto portable = dynamic_cast <Portable*>(this );
106+ if (portable && portable->is_grabbed ())
107+ // The positioning of the grabbed object shall be handled by the player.
108+ return ;
109+
104110 Vector pos = get_pos ();
105111 pos.y = height - pos.y - get_bbox ().get_height ();
106112 set_pos (pos);
You can’t perform that action at this time.
0 commit comments