From d5029958b9017ad89775bc4f68c4de3db603e618 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 22 Dec 2012 00:34:35 -0500 Subject: Readded and optimized mapgen V6 --- src/noise.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/noise.cpp') 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]; } -- cgit v1.2.3