mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add fragment.crop, fragment:crop() & fix fragments rotation when width is not equal to depth & fix extra structures placements
This commit is contained in:
parent
44eedadc06
commit
48143c5a2b
13 changed files with 93 additions and 20 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue