mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Readded and optimized mapgen V6
This commit is contained in:
@@ -289,8 +289,8 @@ void Noise::init(NoiseParams *np, int seed, int sx, int sy, int sz) {
|
||||
this->noisebuf = NULL;
|
||||
resizeNoiseBuf(sz > 1);
|
||||
|
||||
this->buf = new float[sx * sy * sz];
|
||||
this->result = new float[sx * sy * sz];
|
||||
this->buf = new float[sx * sy * sz];
|
||||
this->result = new float[sx * sy * sz];
|
||||
}
|
||||
|
||||
|
||||
@@ -311,10 +311,13 @@ void Noise::setSize(int sx, int sy, int sz) {
|
||||
this->sy = sy;
|
||||
this->sz = sz;
|
||||
|
||||
this->noisebuf = NULL;
|
||||
resizeNoiseBuf(sz > 1);
|
||||
|
||||
delete[] buf;
|
||||
delete[] result;
|
||||
this->buf = new float[sx * sy * sz];
|
||||
this->result = new float[sx * sy * sz];
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user