Skip to content

Commit

Permalink
dd
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jan 16, 2024
1 parent e171d80 commit c63396c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/scenery-editor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "scenery-editor.hpp"
#include "src/anim-atlas.hpp"
#include "loader/loader.hpp"
#include "compat/assert.hpp"
#include "src/world.hpp"
#include "src/RTree-search.hpp"
#include "src/rotation.inl"
Expand Down Expand Up @@ -89,16 +88,15 @@ void scenery_editor::place_tile(world& w, global_coords pos, const scenery_& s,
auto [c, t] = w[pos];
start:
const auto& es = c.objects();
const auto sz = es.size();
while (auto id = a.get_object_colliding_with_cursor())
{
for (auto i = es.size()-1; i != (size_t)-1; i--)
{
for (auto i = 0uz; i < sz; i++)
if (es[i]->id == id)
{
c.remove_object(i);
goto start;
}
}
break;
}
}
Expand Down

0 comments on commit c63396c

Please sign in to comment.