add fragment.crop, fragment:crop() & fix fragments rotation when width is not equal to depth & fix extra structures placements

This commit is contained in:
MihailRis
2024-10-15 00:03:06 +03:00
parent 44eedadc06
commit 48143c5a2b
13 changed files with 93 additions and 20 deletions
+3 -3
View File
@@ -108,10 +108,10 @@ void ChunksStorage::getVoxels(VoxelsVolume* volume, bool backlight) const {
int ecz = floordiv(z + d, CHUNK_D);
int cw = ecx - scx + 1;
int ch = ecz - scz + 1;
int cd = ecz - scz + 1;
// cw*ch chunks will be scanned
for (int cz = scz; cz < scz + ch; cz++) {
// cw*cd chunks will be scanned
for (int cz = scz; cz < scz + cd; cz++) {
for (int cx = scx; cx < scx + cw; cx++) {
const auto& found = chunksMap.find(glm::ivec2(cx, cz));
if (found == chunksMap.end()) {