start of limited range chat feature

This commit is contained in:
Brandon 2014-07-07 21:56:56 -05:00
parent 7da1c1b949
commit fe5336ce66

View File

@ -10,6 +10,7 @@ chat.local_chat = function(pos,text,radius)
if radius == nil then if radius == nil then
radius = 25 radius = 25
end end
if pos ~= nil then
local oir = minetest.get_objects_inside_radius(pos, radius) local oir = minetest.get_objects_inside_radius(pos, radius)
for _,p in pairs(oir) do for _,p in pairs(oir) do
if p:is_player() then if p:is_player() then
@ -17,3 +18,4 @@ chat.local_chat = function(pos,text,radius)
end end
end end
end end
end