mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Readded and optimized mapgen V6
This commit is contained in:
parent
bddd5f2b98
commit
d5029958b9
12 changed files with 1720 additions and 204 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue