mirror of
https://github.com/Cubitect/cubiomes.git
synced 2025-09-22 11:04:57 -04:00
fixed insufficient cache size for initial multilayer
This commit is contained in:
parent
270ed5162b
commit
f1ec592a0e
@ -498,6 +498,10 @@ static void getMaxArea(
|
||||
areaX += layer->edge;
|
||||
areaZ += layer->edge;
|
||||
|
||||
// multi-layers and zoom-layers use a temporary copy of their parent area
|
||||
if (layer->p2 || layer->zoom != 1)
|
||||
*siz += areaX * areaZ;
|
||||
|
||||
if (areaX > *maxX) *maxX = areaX;
|
||||
if (areaZ > *maxZ) *maxZ = areaZ;
|
||||
|
||||
@ -512,10 +516,6 @@ static void getMaxArea(
|
||||
areaZ >>= 2;
|
||||
}
|
||||
|
||||
// multi-layers and zoom-layers use a temporary copy of their parent area
|
||||
if (layer->p2 || layer->zoom != 1)
|
||||
*siz += areaX * areaZ;
|
||||
|
||||
getMaxArea(layer->p, areaX, areaZ, maxX, maxZ, siz);
|
||||
if (layer->p2)
|
||||
getMaxArea(layer->p2, areaX, areaZ, maxX, maxZ, siz);
|
||||
|
Loading…
x
Reference in New Issue
Block a user