From 6202c1cb009d24342a8f59a5500178c41d746489 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 12 Jan 2021 14:40:24 +0100 Subject: Fix removing stale TCB nodes --- advtrains_interlocking/database.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua index e2c9edc..82c7e25 100644 --- a/advtrains_interlocking/database.lua +++ b/advtrains_interlocking/database.lua @@ -431,7 +431,9 @@ end function ildb.remove_tcb(pos) local pts = advtrains.roundfloorpts(pos) - if not track_circuit_breaks[pts] then return end + if not track_circuit_breaks[pts] then + return true --FIX: not an error, because tcb is already removed + end for connid=1,2 do if not ildb.remove_from_interlocking({p=pos, s=connid}) then return false -- cgit v1.2.3