From aee7f0d4198c441c3dd4cb5d33f488607a1a81a5 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 30 Jan 2020 13:59:46 +0100 Subject: Fix things, rework signal aspect select dialog, transform old aspects on-the-fly --- advtrains_interlocking/approach.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'advtrains_interlocking/approach.lua') diff --git a/advtrains_interlocking/approach.lua b/advtrains_interlocking/approach.lua index 151f15a..14a31ce 100644 --- a/advtrains_interlocking/approach.lua +++ b/advtrains_interlocking/approach.lua @@ -75,13 +75,13 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, has_entered, --shunt move if asp.shunt then nspd = SHUNT_SPEED_MAX - elseif asp.shunt.proceed_as_main and asp.main != 0 then + elseif asp.proceed_as_main and asp.main ~= 0 then nspd = asp.main travsht = false end else --train move - if asp.main != 0 then + if asp.main ~= 0 then nspd = asp.main elseif asp.shunt then nspd = SHUNT_SPEED_MAX @@ -98,6 +98,7 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, has_entered, end --atdebug("ns,ts", nspd, travspd) + lspd = travspd local udata = {signal_pos = spos} -- cgit v1.2.3