better way of getting first table elements

master
theFox6 2018-05-17 16:35:12 +02:00
parent 187f68dca6
commit 2a66b0fc4d
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ function working_villages.pathfinder.find_path(pos, endpos, entity)
local current_values
-- Get one index as reference from openSet
current_index, current_values = pairs(openSet)(openSet)
current_index, current_values = next(openSet)
-- Search for lowest fCost
for i, v in pairs(openSet) do