Fix get team by pos
parent
95bbfb4dba
commit
814cf1b717
2
team.lua
2
team.lua
|
@ -65,7 +65,7 @@ bedwars.get_team_by_pos = function(pos)
|
||||||
end
|
end
|
||||||
local smallest = {x = 300, z = 300}
|
local smallest = {x = 300, z = 300}
|
||||||
for team, diff in pairs(diffs) do
|
for team, diff in pairs(diffs) do
|
||||||
if diff.x < smallest.x and diff.z < smallest.z then
|
if diff.x + diff.z < smallest.x + smallest.z then
|
||||||
smallest.x = diff.x
|
smallest.x = diff.x
|
||||||
smallest.z = diff.z
|
smallest.z = diff.z
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue