aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-12-24 12:21:59 -0500
committerGitHub <noreply@github.com>2022-12-24 12:21:59 -0500
commitd13b12b791d8a423a9acaeffc44c27edb7cdb95e (patch)
tree23a66e474c2d3f7a169247675a68fd6bb4535917 /src/mapgen
parent5c248c2d7de3db54e85f7c388743a2eb8e36fee4 (diff)
downloadminetest-d13b12b791d8a423a9acaeffc44c27edb7cdb95e.tar.xz
Store `MapEditEvent` blocks in a vector (#13071)
Diffstat (limited to 'src/mapgen')
-rw-r--r--src/mapgen/mg_schematic.cpp3
-rw-r--r--src/mapgen/treegen.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mapgen/mg_schematic.cpp b/src/mapgen/mg_schematic.cpp
index 8fbbb821e..1e44ae34e 100644
--- a/src/mapgen/mg_schematic.cpp
+++ b/src/mapgen/mg_schematic.cpp
@@ -273,8 +273,7 @@ void Schematic::placeOnMap(ServerMap *map, v3s16 p, u32 flags,
//// Create & dispatch map modification events to observers
MapEditEvent event;
event.type = MEET_OTHER;
- for (it = modified_blocks.begin(); it != modified_blocks.end(); ++it)
- event.modified_blocks.insert(it->first);
+ event.setModifiedBlocks(modified_blocks);
map->dispatchEvent(event);
}
diff --git a/src/mapgen/treegen.cpp b/src/mapgen/treegen.cpp
index 653657752..2c1266431 100644
--- a/src/mapgen/treegen.cpp
+++ b/src/mapgen/treegen.cpp
@@ -137,8 +137,7 @@ treegen::error spawn_ltree(ServerMap *map, v3s16 p0,
// Send a MEET_OTHER event
MapEditEvent event;
event.type = MEET_OTHER;
- for (auto &modified_block : modified_blocks)
- event.modified_blocks.insert(modified_block.first);
+ event.setModifiedBlocks(modified_blocks);
map->dispatchEvent(event);
return SUCCESS;
}