aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-04 16:20:54 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-04 16:20:54 +0200
commit2e67fa3e4841adf85f832d6358de53985de6f12c (patch)
tree28d0faeb0b8bd4c479f5aea391bed365e509ecca
parentea36951bc4ac6d3cc1ebec44c0417cfaed20dfc5 (diff)
downloadminetest-2e67fa3e4841adf85f832d6358de53985de6f12c.tar.gz
minetest-2e67fa3e4841adf85f832d6358de53985de6f12c.tar.bz2
minetest-2e67fa3e4841adf85f832d6358de53985de6f12c.zip
Improve /spawnentity a bit
-rw-r--r--data/mods/default/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua
index e2d267d4e..782eba5a5 100644
--- a/data/mods/default/init.lua
+++ b/data/mods/default/init.lua
@@ -1491,7 +1491,9 @@ minetest.register_on_chat_message(function(name, message)
print("Unable to spawn entity, player is nil")
return true -- Handled chat message
end
- minetest.env:add_entity(player:getpos(), entityname)
+ local p = player:getpos()
+ p.y = p.y + 1
+ minetest.env:add_entity(p, entityname)
minetest.chat_send_player(name, '"'..entityname
..'" spawned.');
return true -- Handled chat message