diff options
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r-- | editor/editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 1b0611e1..a1de4b4f 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -110,7 +110,8 @@ void editor::on_click_(world& world, global_coords pos, button b) default: break; case button::place: if (const auto& sel = mode->get_selected()) - mode->place_tile(world, pos, sel, *_app); + if (auto [ch, t] = world[pos]; ch.can_place_entity(sel.proto, pos.local())) + mode->place_tile(world, pos, sel, *_app); break; case button::remove: mode->place_tile(world, pos, {}, *_app); |