aboutsummaryrefslogtreecommitdiff
path: root/advtrains_line_automation
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-02-16 21:50:07 +0100
committerorwell96 <orwell@bleipb.de>2019-02-16 21:51:14 +0100
commit84f1c3d8a5eb7807c069718c08e6e453ffd585e3 (patch)
tree3f97b0a4bbd0c4ac2c1a6caa3aa4c0934896716f /advtrains_line_automation
parentee079d02ff09c4ae4bc63d892e83146dfe6edd6c (diff)
downloadadvtrains-84f1c3d8a5eb7807c069718c08e6e453ffd585e3.tar.gz
advtrains-84f1c3d8a5eb7807c069718c08e6e453ffd585e3.tar.bz2
advtrains-84f1c3d8a5eb7807c069718c08e6e453ffd585e3.zip
Fix stop rails sometimes not sending stop command
Diffstat (limited to 'advtrains_line_automation')
-rw-r--r--advtrains_line_automation/stoprail.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua
index 2610d1c..6e4a6e2 100644
--- a/advtrains_line_automation/stoprail.lua
+++ b/advtrains_line_automation/stoprail.lua
@@ -146,9 +146,7 @@ local adefunc = function(def, preset, suffix, rotation)
end
end
end,
- on_train_enter = function(pos, train_id)
- local train = advtrains.trains[train_id]
- local index = atfloor(train.index)
+ on_train_enter = function(pos, train_id, train, index)
if train.path_cn[index] == 1 then
local pe = advtrains.encode_pos(pos)
local stdata = advtrains.lines.stops[pe]