aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/approach.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/approach.lua')
-rw-r--r--advtrains_interlocking/approach.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/advtrains_interlocking/approach.lua b/advtrains_interlocking/approach.lua
index 0894043..151f15a 100644
--- a/advtrains_interlocking/approach.lua
+++ b/advtrains_interlocking/approach.lua
@@ -73,17 +73,17 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, has_entered,
--interpreting aspect and determining speed to proceed
if travsht then
--shunt move
- if asp.shunt.free then
+ if asp.shunt then
nspd = SHUNT_SPEED_MAX
- elseif asp.shunt.proceed_as_main and asp.main.free then
- nspd = asp.main.speed
+ elseif asp.shunt.proceed_as_main and asp.main != 0 then
+ nspd = asp.main
travsht = false
end
else
--train move
- if asp.main.free then
- nspd = asp.main.speed
- elseif asp.shunt.free then
+ if asp.main != 0 then
+ nspd = asp.main
+ elseif asp.shunt then
nspd = SHUNT_SPEED_MAX
travsht = true
end