1
0
Fork 0
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:
kwolekr 2012-12-22 00:34:35 -05:00 committed by Perttu Ahola
parent bddd5f2b98
commit d5029958b9
12 changed files with 1720 additions and 204 deletions

View file

@ -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];
}