]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/noise.h
Limit speed in collisionMoveResult for avoiding hangs
[dragonfireclient.git] / src / noise.h
index c2a85771ccdf9a3e2ad74da1417ff643ef468556..34b4d0b41bcad8cdea32e4ba38ffe86e0b381324 100644 (file)
@@ -89,7 +89,7 @@ class Noise {
        Noise(NoiseParams *np, int seed, int sx, int sy, int sz);
        ~Noise();
 
-       void init(NoiseParams *np, int seed, int sx, int sy, int sz);
+       virtual void init(NoiseParams *np, int seed, int sx, int sy, int sz);
        void setSize(int sx, int sy);
        void setSize(int sx, int sy, int sz);
        void setSpreadFactor(v3f spread);
@@ -157,7 +157,7 @@ inline float easeCurve(float t) {
                (s) + (np)->seed, (np)->octaves, (np)->persist))
 
 #define NoisePerlin3D(np, x, y, z, s) ((np)->offset + (np)->scale * \
-               noise2d_perlin((float)(x) / (np)->spread.X, (float)(y) / (np)->spread.Y, \
+               noise3d_perlin((float)(x) / (np)->spread.X, (float)(y) / (np)->spread.Y, \
                (float)(z) / (np)->spread.Z, (s) + (np)->seed, (np)->octaves, (np)->persist))
 
 #endif