1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix issue #1009 (minetest.get_connected_players() returns non-existing players)

This commit is contained in:
kwolekr 2013-11-17 02:57:40 -05:00
parent a55c073ce9
commit 86ef7147b6
3 changed files with 17 additions and 1 deletions

View file

@ -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