add chunk_height parameter to place_structures
This commit is contained in:
@@ -155,10 +155,11 @@ public:
|
||||
/// @param size size of the area (blocks)
|
||||
/// @param seed world seed
|
||||
/// @param heightmap area heightmap
|
||||
/// @param chunkHeight chunk height to use as heights multiplier
|
||||
/// @return structure placements
|
||||
virtual std::vector<StructurePlacement> placeStructures(
|
||||
const glm::ivec2& offset, const glm::ivec2& size, uint64_t seed,
|
||||
const std::shared_ptr<Heightmap>& heightmap) = 0;
|
||||
const std::shared_ptr<Heightmap>& heightmap, uint chunkHeight) = 0;
|
||||
};
|
||||
|
||||
/// @brief Structure voxel fragments and metadata
|
||||
|
||||
@@ -177,7 +177,7 @@ void WorldGenerator::generateStructures(
|
||||
|
||||
util::concat(prototype.structures, def.script->placeStructures(
|
||||
{chunkX * CHUNK_W, chunkZ * CHUNK_D}, {CHUNK_W, CHUNK_D}, seed,
|
||||
heightmap
|
||||
heightmap, CHUNK_H
|
||||
));
|
||||
for (const auto& placement : prototype.structures) {
|
||||
const auto& offset = placement.position;
|
||||
|
||||
Reference in New Issue
Block a user