fix(prototype): read path edges as EdgeIdDir
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eaf6553cae
commit
aa5dfa655f
1 file changed
+3
-2
@@ -13,9 +13,10 @@ local function p(s : string)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function edgeAt(mp : Engine.Component.MovePath) : EdgeId, boolean
|
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
|
if e == nil then return nil, nil end
|
||||||
return e[1], e[2]
|
return e.edgeId, e.dir
|
||||||
end
|
end
|
||||||
|
|
||||||
local function turnaround(edge : EdgeId) : integer
|
local function turnaround(edge : EdgeId) : integer
|
||||||
|
|||||||
Reference in new issue
Block a user