From 401082503185381c2eec9dc0af6fa44caf846e5e Mon Sep 17 00:00:00 2001 From: orwell96 Date: Sun, 21 Aug 2016 16:49:48 +0200 Subject: fix error in real train index calculation --- wagons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagons.lua b/wagons.lua index e6b6d71..038c448 100644 --- a/wagons.lua +++ b/wagons.lua @@ -306,7 +306,7 @@ function advtrains.get_real_path_index(train, pit) end index=index-(pos_in_train_left/(train.path_dist[index-1] or 1)) else - index=index-(pos_in_train_left*(train.path_dist[math.floor(index-1)] or 1)) + index=index-(pos_in_train_left/(train.path_dist[math.floor(index-1)] or 1)) end return index end -- cgit v1.2.3