# HG changeset patch # User MMOSimca # Date 1471019570 14400 # Node ID f924bec6cf5ebd42d18d9ec754f0751905e457a9 # Parent 274776fa70c8f06c83514aceb4a30b8674d312e4 Prevent out of bounds coordinates from being recorded for whatever reason. diff -r 274776fa70c8 -r f924bec6cf5e Main.lua --- a/Main.lua Thu Aug 11 09:36:45 2016 -0400 +++ b/Main.lua Fri Aug 12 12:32:50 2016 -0400 @@ -326,16 +326,30 @@ local x_int = nil if (x and type(x) == "number") then x_int = _G.floor(x * 1000) + + -- Limit precision to 0.2 if x_int % 2 ~= 0 then x_int = x_int + 1 end + + -- Prevent out of bounds coordinates + if (x_int < 0 or x_int > 1000) then + x_int = nil + end end local y_int = nil if (y and type(y) == "number") then y_int = _G.floor(y * 1000) + + -- Limit precision to 0.2 if y_int % 2 ~= 0 then y_int = y_int + 1 end + + -- Prevent out of bounds coordinates + if (y_int < 0 or y_int > 1000) then + y_int = nil + end end return zone_name, current_area_id, x_int, y_int, map_level, InstanceDifficultyToken()