From 75a0ca6bd67aa9ca87668bc27d36399b5028c2b1 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 12 Nov 2011 15:14:24 +0200 Subject: Scripting WIP --- src/inventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/inventory.cpp') 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; -- cgit v1.2.3