aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/wagons.lua8
-rw-r--r--advtrains_luaautomation/atc_rail.lua8
2 files changed, 4 insertions, 12 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 12fd74e..b67449d 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -885,9 +885,7 @@ function wagon:handle_bordcom_fields(pname, formname, fields)
if fields.line~="" then
if fields.line ~= train.line then
train.line=fields.line
- if advtrains.interlocking then
- advtrains.interlocking.lzb_invalidate(train)
- end
+ minetest.after(0, advtrains.invalidate_path, train.id)
end
else
train.line=nil
@@ -897,9 +895,7 @@ function wagon:handle_bordcom_fields(pname, formname, fields)
if fields.routingcode~="" then
if fields.routingcode ~= train.routingcode then
train.routingcode=fields.routingcode
- if advtrains.interlocking then
- advtrains.interlocking.lzb_invalidate(train)
- end
+ minetest.after(0, advtrains.invalidate_path, train.id)
end
else
train.routingcode=nil
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index f4b3337..bc1e00e 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -58,9 +58,7 @@ function r.fire_event(pos, evtdata)
return false
end
train.line = line .. ""
- if advtrains.interlocking then
- advtrains.interlocking.lzb_invalidate(train)
- end
+ minetest.after(0, advtrains.invalidate_path, train_id)
return true
end,
get_line = function()
@@ -71,9 +69,7 @@ function r.fire_event(pos, evtdata)
return false
end
train.routingcode = rc
- if advtrains.interlocking then
- advtrains.interlocking.lzb_invalidate(train)
- end
+ minetest.after(0, advtrains.invalidate_path, train_id)
return true
end,
get_rc = function()