Blob ore: Fix partial blobs
authorparamat <mat.gregory@virginmedia.com>
Fri, 18 Sep 2015 19:44:15 +0000 (20:44 +0100)
committerparamat <mat.gregory@virginmedia.com>
Sat, 19 Sep 2015 01:27:00 +0000 (02:27 +0100)
src/mg_ore.cpp

index 28be816f50c18c53ab8a5535c5f51ff49a79515d..16d97685a35c371f822297513aed79fc18fd9d30 100644 (file)
@@ -358,9 +358,9 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
 
                        float noiseval = noise->result[index];
 
-                       float xdist = x1 - csize / 2;
-                       float ydist = y1 - csize / 2;
-                       float zdist = z1 - csize / 2;
+                       float xdist = (s32)x1 - (s32)csize / 2;
+                       float ydist = (s32)y1 - (s32)csize / 2;
+                       float zdist = (s32)z1 - (s32)csize / 2;
 
                        noiseval -= (sqrt(xdist * xdist + ydist * ydist + zdist * zdist) / csize);