diff --git a/api.lua b/api.lua index 6e5d0f1..730e96d 100644 --- a/api.lua +++ b/api.lua @@ -18,10 +18,6 @@ end function areas:getAreasAtPos(pos) local res = {} - pos = vector.apply(pos, function(p) - return math.max(math.min(p, 2147483), -2147483) - end) - if self.store then local a = self.store:get_areas_for_pos(pos, false, true) for store_id, store_area in pairs(a) do diff --git a/hud.lua b/hud.lua index 0b7931f..cd70781 100644 --- a/hud.lua +++ b/hud.lua @@ -6,6 +6,9 @@ minetest.register_globalstep(function(dtime) for _, player in pairs(minetest.get_connected_players()) do local name = player:get_player_name() local pos = vector.round(player:getpos()) + pos = vector.apply(pos, function(p) + return math.max(math.min(p, 2147483), -2147483) + end) local areaStrings = {} for id, area in pairs(areas:getAreasAtPos(pos)) do