aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-11-17 02:57:40 -0500
committerkwolekr <kwolekr@minetest.net>2013-11-17 15:15:59 -0500
commit86ef7147b60868f86d38d55a1dcf6271d68427ce (patch)
treea449513e687710211b92e4555895f96d14dda460 /builtin
parenta55c073ce9bd78a6ebbb867ab4db2ec611eb66cf (diff)
downloadminetest-86ef7147b60868f86d38d55a1dcf6271d68427ce.tar.gz
minetest-86ef7147b60868f86d38d55a1dcf6271d68427ce.tar.bz2
minetest-86ef7147b60868f86d38d55a1dcf6271d68427ce.zip
Fix issue #1009 (minetest.get_connected_players() returns non-existing players)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/misc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/misc.lua b/builtin/misc.lua
index a6a1718ad..fd80aacf6 100644
--- a/builtin/misc.lua
+++ b/builtin/misc.lua
@@ -53,7 +53,9 @@ end)
function minetest.get_connected_players()
local temp_table = {}
for index, value in pairs(player_list) do
- table.insert(temp_table, value)
+ if value:is_player_connected() then
+ table.insert(temp_table, value)
+ end
end
return temp_table
end