Add hotfix for path invalidation
This commit is contained in:
parent
6ae0615309
commit
a4abbf8824
|
@ -341,7 +341,8 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel)
|
|||
end
|
||||
else
|
||||
--atdebug("Committed Route:",tcbs.routeset)
|
||||
has_changed_aspect = true
|
||||
-- set_route now sets the signal aspects
|
||||
--has_changed_aspect = true
|
||||
end
|
||||
end
|
||||
if has_changed_aspect then
|
||||
|
|
|
@ -228,7 +228,9 @@ function advtrains.interlocking.signal_on_aspect_changed(pos)
|
|||
if not ipts then return end
|
||||
local ipos = minetest.string_to_pos(ipts)
|
||||
|
||||
advtrains.invalidate_all_paths_ahead(ipos)
|
||||
-- FIXME: invalidate_all_paths_ahead does not appear to always work as expected
|
||||
--advtrains.invalidate_all_paths_ahead(ipos)
|
||||
minetest.after(0, advtrains.invalidate_all_paths, ipos)
|
||||
end
|
||||
|
||||
function advtrains.interlocking.signal_rc_handler(pos, node, player, itemstack, pointed_thing)
|
||||
|
|
|
@ -108,6 +108,11 @@ local function set_aspect(pos, asp, skipdst)
|
|||
if (not skipdst) and aspect_changed then
|
||||
D.update_main(pos)
|
||||
end
|
||||
--[[
|
||||
local dbgmsg = string.format("[%s]set_aspect(%s,%s,%s)", os.clock(), minetest.pos_to_string(pos), minetest.serialize(asp), tostring(skipdst))
|
||||
dbgmsg = debug.traceback(dbgmsg, 2)
|
||||
minetest.chat_send_all(dbgmsg)
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue