Skip to content

Commit

Permalink
Merge pull request #2 from grimmier378/fix_dropped
Browse files Browse the repository at this point in the history
fix:
  • Loading branch information
yb-f committed Apr 8, 2024
2 parents 768bbb4 + b15c90e commit 3caf2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Expand Up @@ -261,7 +261,7 @@ local getDistance = function(spawn)
distance = -1
return textColor, distance
end
distance = tonumber(string.format("%.2f", spawn.Distance()))
distance = tonumber(string.format("%d", math.floor(spawn.Distance())))
if distance <= settings.distance.close then
textColor = settings.distance.colorClose
elseif distance <= settings.distance.medium then
Expand Down Expand Up @@ -510,7 +510,7 @@ local displayGUI = function()
ImGui.TableSetupScrollFreeze(0, 1)
ImGui.TableHeadersRow()
for i = 1, max_xtargs do
if mq.TLO.Me.XTarget(i)() ~= '' then
if mq.TLO.Me.XTarget(i)()~=nil and mq.TLO.Me.XTarget(i)() ~= 0 then
local drawData = {}
drawData.row = i
drawData.spawn = mq.TLO.Me.XTarget(i)
Expand Down

0 comments on commit 3caf2cb

Please sign in to comment.