aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/lzb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/lzb.lua')
-rw-r--r--advtrains_interlocking/lzb.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/advtrains_interlocking/lzb.lua b/advtrains_interlocking/lzb.lua
index 51d597b..1f9589e 100644
--- a/advtrains_interlocking/lzb.lua
+++ b/advtrains_interlocking/lzb.lua
@@ -4,7 +4,7 @@
local function approach_callback(parpos, train_id, train, index)
local pos = advtrains.round_vector_floor_y(parpos)
-
+
local node=pnode or advtrains.ndb.get_node(pos)
local ndef=minetest.registered_nodes[node.name]
if ndef and ndef.advtrains and ndef.advtrains.on_train_approach then
@@ -88,6 +88,14 @@ local function look_ahead(id, train)
-- check for signal
local asp, spos = il.db.get_ip_signal_asp(pts, cn)
+
+ -- do ARS if needed
+ if spos then
+ local sigd = il.db.get_sigd_for_signal(spos)
+ if sigd then
+ il.ars_check(sigd, train)
+ end
+ end
--atdebug("trav: ",pos, cn, asp, spos, "travsht=", lzb.travsht)
if asp then
local nspd = 0