summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-12 15:14:24 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:40 +0200
commit75a0ca6bd67aa9ca87668bc27d36399b5028c2b1 (patch)
tree0ba77ad2aec19a52161c6a361e7f04b1aadf1512 /src/inventory.cpp
parent38944467d31bbfa8a98008962f147cbc3c73f507 (diff)
downloadminetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.tar.gz
minetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.tar.bz2
minetest-75a0ca6bd67aa9ca87668bc27d36399b5028c2b1.zip
Scripting WIP
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 5d4a6e408..45646a69a 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -135,6 +135,10 @@ ServerActiveObject* InventoryItem::createSAO(ServerEnvironment *env, u16 id, v3f
/*
Create an ItemSAO
*/
+ pos.Y -= BS*0.25; // let it drop a bit
+ // Randomize a bit
+ pos.X += BS*0.2*(float)myrand_range(-1000,1000)/1000.0;
+ pos.Z += BS*0.2*(float)myrand_range(-1000,1000)/1000.0;
// Create object
ServerActiveObject *obj = new ItemSAO(env, pos, getItemString());
return obj;