1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-28 06:07:41 +00:00

refactor + cleanup

This commit is contained in:
kepler155c@gmail.com
2017-10-27 20:24:48 -04:00
parent cac15722b8
commit 1b9450017d
12 changed files with 371 additions and 430 deletions

View File

@@ -18,7 +18,7 @@ if (...) then
if node._g + mCost < neighbour._g then
neighbour._parent = node
neighbour._g = node._g + mCost
neighbour._heading = heading
neighbour.heading = heading
end
end
@@ -64,10 +64,10 @@ if (...) then
end
--[[
printf('x:%d y:%d z:%d g:%d', node._x, node._y, node._z, node._g)
printf('x:%d y:%d z:%d g:%d', node.x, node.y, node.z, node._g)
for i = 1,#neighbours do
local n = neighbours[i]
printf('x:%d y:%d z:%d f:%f g:%f h:%d', n._x, n._y, n._z, n._f, n._g, n._heading or -1)
printf('x:%d y:%d z:%d f:%f g:%f h:%d', n.x, n.y, n.z, n._f, n._g, n.heading or -1)
end
--]]