diff options
-rw-r--r-- | advtrains/wagons.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index c5e1e17..4e7fb26 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -1074,10 +1074,10 @@ function wagon:handle_bordcom_fields(pname, formname, fields) -- Interlocking functionality: If the interlocking module is loaded, you can set the signal aspect -- from inside the train if advtrains.interlocking then - if fields.ilrs and train.lzb and #train.lzb.oncoming > 0 then + if fields.ilrs and train.lzb and #train.lzb.checkpoints > 0 then local i=1 - while train.lzb.oncoming[i] do - local oci = train.lzb.oncoming[i] + while train.lzb.checkpoints[i] do + local oci = train.lzb.checkpoints[i] 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 |