Skip to content
Snippets Groups Projects
Unverified Commit 4d4b9269 authored by Buckaroo Banzai's avatar Buckaroo Banzai Committed by GitHub
Browse files

fix mismatched teleport/waypoint selection

parent a3e6096a
Branches
No related tags found
No related merge requests found
...@@ -91,8 +91,8 @@ local function show_formspec(playername, data) ...@@ -91,8 +91,8 @@ local function show_formspec(playername, data)
return a.distance < b.distance return a.distance < b.distance
end) end)
-- store as last result -- data to store as last result
search_results[playername] = data local last_result_data = {}
-- render list items -- render list items
for _, item in ipairs(data) do for _, item in ipairs(data) do
...@@ -140,6 +140,10 @@ local function show_formspec(playername, data) ...@@ -140,6 +140,10 @@ local function show_formspec(playername, data)
item.description = description item.description = description
if add_to_list then if add_to_list then
-- result data
table.insert(last_result_data, item)
-- formspec data
list = list .. "," .. list = list .. "," ..
color .. "," .. color .. "," ..
distance .. "," .. distance .. "," ..
...@@ -150,6 +154,9 @@ local function show_formspec(playername, data) ...@@ -150,6 +154,9 @@ local function show_formspec(playername, data)
end end
-- store filtered result data
search_results[playername] = last_result_data
list = list .. ";]" list = list .. ";]"
local teleport_button = "" local teleport_button = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment