aboutsummaryrefslogtreecommitdiff
path: root/data/mods/experimental
diff options
context:
space:
mode:
Diffstat (limited to 'data/mods/experimental')
-rw-r--r--data/mods/experimental/init.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/data/mods/experimental/init.lua b/data/mods/experimental/init.lua
index 52a729a4a..dd0d60f4e 100644
--- a/data/mods/experimental/init.lua
+++ b/data/mods/experimental/init.lua
@@ -7,12 +7,18 @@
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()))
+ objs = minetest.env:get_objects_inside_radius({x=0,y=0,z=0}, 10)
+ for k, obj in pairs(objs) do
+ name = obj:get_player_name()
+ if name then
+ print(name.." at "..dump(obj:getpos()))
+ print(name.." dir: "..dump(obj:get_look_dir()))
+ print(name.." pitch: "..dump(obj:get_look_pitch()))
+ print(name.." yaw: "..dump(obj:get_look_yaw()))
+ else
+ print("Some object at "..dump(obj:getpos()))
+ end
+ end
--]]
end
minetest.register_globalstep(on_step)