aboutsummaryrefslogtreecommitdiff
path: root/data/mods/experimental/init.lua
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-28 17:34:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-28 17:34:07 +0200
commit7937813c98255736c6847fe2d1302e0c6b309b04 (patch)
tree584c26ef63d273473c44fae577faa07bfb3b4e36 /data/mods/experimental/init.lua
parentad4040d982ad0a52a27df262351fd747b5408265 (diff)
downloadminetest-7937813c98255736c6847fe2d1302e0c6b309b04.tar.gz
minetest-7937813c98255736c6847fe2d1302e0c6b309b04.tar.bz2
minetest-7937813c98255736c6847fe2d1302e0c6b309b04.zip
Add get_look_dir(), get_look_pitch() and get_look_yaw() for players
Diffstat (limited to 'data/mods/experimental/init.lua')
-rw-r--r--data/mods/experimental/init.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/data/mods/experimental/init.lua b/data/mods/experimental/init.lua
index d180d4778..52a729a4a 100644
--- a/data/mods/experimental/init.lua
+++ b/data/mods/experimental/init.lua
@@ -2,6 +2,21 @@
-- Experimental things
--
+-- For testing random stuff
+
+function on_step(dtime)
+ -- print("experimental on_step")
+ --[[
+ print("celeron55 dir: "..dump(
+ minetest.env:get_player_by_name("celeron55"):get_look_dir()))
+ print("celeron55 pitch: "..dump(
+ minetest.env:get_player_by_name("celeron55"):get_look_pitch()))
+ print("celeron55 yaw: "..dump(
+ minetest.env:get_player_by_name("celeron55"):get_look_yaw()))
+ --]]
+end
+minetest.register_globalstep(on_step)
+
-- An example furnace-thing implemented in Lua
minetest.register_node("experimental:luafurnace", {