diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-06-02 15:47:36 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-06-03 22:31:01 +0300 |
commit | bf8cfce50e3f32b84c7fccf470601986d6f7913f (patch) | |
tree | 9cb99973db9cb1c83b184ff0d9fe0e8cee2fd9f5 /builtin | |
parent | b235e4d290e3565a2789ec5097d33b1ec9dbb5ce (diff) | |
download | minetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.tar.gz minetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.tar.bz2 minetest-bf8cfce50e3f32b84c7fccf470601986d6f7913f.zip |
Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/misc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/misc.lua b/builtin/misc.lua index b3b1ec6e8..e018aff85 100644 --- a/builtin/misc.lua +++ b/builtin/misc.lua @@ -44,7 +44,7 @@ function minetest.get_connected_players() -- This could be optimized a bit, but leave that for later local list = {} for _, obj in pairs(minetest.env:get_objects_inside_radius({x=0,y=0,z=0}, 1000000)) do - if obj:get_player_name() then + if obj:is_player() then table.insert(list, obj) end end |