diff options
| author | ilotterytea <iltsu@alright.party> | 2025-02-01 23:35:25 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-02-01 23:35:25 +0500 |
| commit | 38637328ef7627d495a49312e67c9ec363cc450e (patch) | |
| tree | 85bf3f3183ea8a9d26d8e203e10a51d8fc33930a /src/floor.cpp | |
| parent | a3ecc099aa0048ad0068a41c3e20cd3c463e09f4 (diff) | |
fix: tiles were only removed on the 1st layer
Diffstat (limited to 'src/floor.cpp')
| -rw-r--r-- | src/floor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/floor.cpp b/src/floor.cpp index 6632b6a..aacf77e 100644 --- a/src/floor.cpp +++ b/src/floor.cpp @@ -57,8 +57,9 @@ namespace silly::editor { layer.tiles.push_back({tile, position, rotation}); } } - void TileFloor::remove_tile(const sf::Vector2i &position) { - TileLayer &layer = this->layers.at(this->activeLayerIndex); + void TileFloor::remove_tile(TilesetTileType type, + const sf::Vector2i &position) { + TileLayer &layer = this->layers.at(type); layer.tiles.resize(std::distance( layer.tiles.begin(), |
