You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Make sure the tile data clears its terrain field when said terrain is removed from the tileset.
This commit is contained in:
@@ -4924,6 +4924,10 @@ void TileData::move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {
|
|||||||
|
|
||||||
void TileData::remove_terrain(int p_terrain_set, int p_index) {
|
void TileData::remove_terrain(int p_terrain_set, int p_index) {
|
||||||
if (terrain_set == p_terrain_set) {
|
if (terrain_set == p_terrain_set) {
|
||||||
|
if (terrain == p_index) {
|
||||||
|
terrain = -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
if (terrain_peering_bits[i] == p_index) {
|
if (terrain_peering_bits[i] == p_index) {
|
||||||
terrain_peering_bits[i] = -1;
|
terrain_peering_bits[i] = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user