fix(prototype): read path edges as EdgeIdDir

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haylanandClaude Bot committed 2026-10-05 22:16:17 +02:00
1 parent eaf6553cae
commit aa5dfa655f
1 file changed
+3 -2
+3 -2
View File
@@ -13,9 +13,10 @@ local function p(s : string)
end
local function edgeAt(mp : Engine.Component.MovePath) : EdgeId, boolean
local e = mp.path.edges[mp.dyn.pathPos.edgeIndex + 1]
-- path.edges is 1-based, elements are EdgeIdDir userdata (tealdef says {EdgeId, boolean})
local e = (mp.path.edges as {any})[mp.dyn.pathPos.edgeIndex + 1] as UtilPathfinding.EdgeIdDir
if e == nil then return nil, nil end
return e[1], e[2]
return e.edgeId, e.dir
end
local function turnaround(edge : EdgeId) : integer