From c081129fe040d2dd62d36777ec5eeae315fd0928 Mon Sep 17 00:00:00 2001 From: orwell Date: Sun, 1 Dec 2024 23:51:41 +0100 Subject: Misc Fixes found during play --- advtrains_interlocking/database.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'advtrains_interlocking/database.lua') diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua index 75247de..c05e69a 100644 --- a/advtrains_interlocking/database.lua +++ b/advtrains_interlocking/database.lua @@ -701,7 +701,7 @@ local function recursively_find_routes(s_pos, s_connid, locks_found, result_tabl local pos, connid, bconnid = ti:next_branch() pos, connid, bconnid = ti:next_track()-- step once to get ahead of previous turnout local last_pos - repeat + while pos do -- this stops the loop when either the track end is reached or the limit is hit local node = advtrains.ndb.get_node_or_nil(pos) --atdebug("Walk ",pos, "nodename", node.name, "entering at conn",bconnid) local ndef = minetest.registered_nodes[node.name] @@ -739,7 +739,7 @@ local function recursively_find_routes(s_pos, s_connid, locks_found, result_tabl -- Go forward last_pos = pos pos, connid, bconnid = ti:next_track() - until not pos -- this stops the loop when either the track end is reached or the limit is hit + end --atdebug("recursively_find_routes: Reached track end or limit at", last_pos, ". This path is not saved, returning") end @@ -832,7 +832,7 @@ function ildb.remove_tcb_at(pos, pname, skip_tsrepair) advtrains.interlocking.remove_tcb_marker(pos) -- If needed, merge the track sections here if not skip_tsrepair then - ildb.check_and_repair_ts_at_pos(pos, pname) + ildb.check_and_repair_ts_at_pos(pos, nil, pname) end return true end -- cgit v1.2.3