aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-09-18 20:44:15 +0100
committerparamat <mat.gregory@virginmedia.com>2015-09-19 02:27:00 +0100
commit795db97fe3a6af8db039b7a7aed6f419e3e44f1b (patch)
treefb7e540315a5d10f4b6802a8467601a7c1d7b0e8
parent691eb2d06d646ff96af9aaed0bfe823f64f0acda (diff)
downloadminetest-795db97fe3a6af8db039b7a7aed6f419e3e44f1b.tar.gz
minetest-795db97fe3a6af8db039b7a7aed6f419e3e44f1b.tar.bz2
minetest-795db97fe3a6af8db039b7a7aed6f419e3e44f1b.zip
Blob ore: Fix partial blobs
-rw-r--r--src/mg_ore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mg_ore.cpp b/src/mg_ore.cpp
index 28be816f5..16d97685a 100644
--- a/src/mg_ore.cpp
+++ b/src/mg_ore.cpp
@@ -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);