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
|
end
|
||||||
else
|
else
|
||||||
--atdebug("Committed Route:",tcbs.routeset)
|
--atdebug("Committed Route:",tcbs.routeset)
|
||||||
has_changed_aspect = true
|
-- set_route now sets the signal aspects
|
||||||
|
--has_changed_aspect = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if has_changed_aspect then
|
if has_changed_aspect then
|
||||||
|
|
|
@ -228,7 +228,9 @@ function advtrains.interlocking.signal_on_aspect_changed(pos)
|
||||||
if not ipts then return end
|
if not ipts then return end
|
||||||
local ipos = minetest.string_to_pos(ipts)
|
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
|
end
|
||||||
|
|
||||||
function advtrains.interlocking.signal_rc_handler(pos, node, player, itemstack, pointed_thing)
|
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
|
if (not skipdst) and aspect_changed then
|
||||||
D.update_main(pos)
|
D.update_main(pos)
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue