aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-04-23 22:30:33 +0200
committerorwell96 <orwell@bleipb.de>2019-04-23 22:30:33 +0200
commitff9412976154f60982e3a2f32108e36a1fd61635 (patch)
tree6bebdef301692607aef24e420d3014d83b6d15d4
parentb56cda8695e4af6ebc5bf98c01de715979a219db (diff)
downloadadvtrains-ff9412976154f60982e3a2f32108e36a1fd61635.tar.gz
advtrains-ff9412976154f60982e3a2f32108e36a1fd61635.tar.bz2
advtrains-ff9412976154f60982e3a2f32108e36a1fd61635.zip
Fix occurences of old lzb_invalidate
-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()