From 84f1c3d8a5eb7807c069718c08e6e453ffd585e3 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Sat, 16 Feb 2019 21:50:07 +0100 Subject: Fix stop rails sometimes not sending stop command --- advtrains_line_automation/stoprail.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'advtrains_line_automation') 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] -- cgit v1.2.3