diff options
author | kwolekr <mirrorisim@gmail.com> | 2012-12-22 00:34:35 -0500 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-01-21 21:41:37 +0200 |
commit | d5029958b9017ad89775bc4f68c4de3db603e618 (patch) | |
tree | 757d6e545217c3b0da34d66d00f1e5a99aeb22a2 /src/noise.cpp | |
parent | bddd5f2b98a56fc735d5687ecd0b43767aec8066 (diff) | |
download | minetest-d5029958b9017ad89775bc4f68c4de3db603e618.tar.gz minetest-d5029958b9017ad89775bc4f68c4de3db603e618.tar.bz2 minetest-d5029958b9017ad89775bc4f68c4de3db603e618.zip |
Readded and optimized mapgen V6
Diffstat (limited to 'src/noise.cpp')
-rw-r--r-- | src/noise.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/noise.cpp b/src/noise.cpp index c038384db..17b5df018 100644 --- a/src/noise.cpp +++ b/src/noise.cpp @@ -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]; } |