diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 19f57dda0037..f340573c6a23 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -5116,6 +5116,8 @@ void TileData::remove_terrain(int p_terrain_set, int p_index) { if (terrain_set == p_terrain_set) { if (terrain == p_index) { terrain = -1; + } else if (terrain > p_index) { + terrain -= 1; } for (int i = 0; i < 16; i++) {