randomize rotatable plants in world generation
This commit is contained in:
@@ -389,7 +389,12 @@ void WorldGenerator::generatePlants(
|
||||
}
|
||||
auto& groundVoxel = voxels[vox_index(x, height, z)];
|
||||
if (indices.get(groundVoxel.id)->rt.solid) {
|
||||
const auto& def = indices.require(plant);
|
||||
voxel = {plant, {}};
|
||||
if (def.rotatable && def.rotations.variantsCount) {
|
||||
voxel.state.rotation =
|
||||
plantsRand.rand() % def.rotations.variantsCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user