aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-04-16 12:59:17 +0200
committerorwell96 <orwell@bleipb.de>2019-04-16 12:59:17 +0200
commitb56cda8695e4af6ebc5bf98c01de715979a219db (patch)
treeb6d66443189283122cad18ae9c4f18771b203611
parentea33ad9de0a77887f0181d8581568fe79d14255e (diff)
downloadadvtrains-b56cda8695e4af6ebc5bf98c01de715979a219db.tar.gz
advtrains-b56cda8695e4af6ebc5bf98c01de715979a219db.tar.bz2
advtrains-b56cda8695e4af6ebc5bf98c01de715979a219db.zip
Fix remote routesetting
-rw-r--r--advtrains/lzb.lua2
-rw-r--r--advtrains/wagons.lua4
-rw-r--r--advtrains_interlocking/approach.lua2
3 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/lzb.lua b/advtrains/lzb.lua
index efbce66..afbf68e 100644
--- a/advtrains/lzb.lua
+++ b/advtrains/lzb.lua
@@ -172,7 +172,7 @@ function advtrains.lzb_add_checkpoint(train, index, speed, callback, udata)
idx = index,
spd = speed,
fun = callback,
- data = udata,
+ udata = udata,
})
end
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 381f835..12fd74e 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -927,8 +927,8 @@ function wagon:handle_bordcom_fields(pname, formname, fields)
local i=1
while train.lzb.oncoming[i] do
local oci = train.lzb.oncoming[i]
- if oci.pos then
- local sigd = advtrains.interlocking.db.get_sigd_for_signal(oci.pos)
+ if oci.udata and oci.udata.signal_pos then
+ local sigd = advtrains.interlocking.db.get_sigd_for_signal(oci.udata.signal_pos)
if sigd then
advtrains.interlocking.show_signalling_form(sigd, pname)
return
diff --git a/advtrains_interlocking/approach.lua b/advtrains_interlocking/approach.lua
index 630ebfe..3fe72f6 100644
--- a/advtrains_interlocking/approach.lua
+++ b/advtrains_interlocking/approach.lua
@@ -105,7 +105,7 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, lzbdata)
local udata = {signal_pos = spos}
local callback = get_over_function(lspd, travsht)
- advtrains.lzb_add_checkpoint(train, index, lspd, callback)
+ advtrains.lzb_add_checkpoint(train, index, lspd, callback, udata)
end
lzbdata.travsht = travsht
lzbdata.travspd = travspd