aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-08-21 16:49:48 +0200
committerorwell96 <mono96.mml@gmail.com>2016-08-21 16:49:48 +0200
commit401082503185381c2eec9dc0af6fa44caf846e5e (patch)
tree4e0e361c46468594845f14acef8e2b856e60c05e
parent931aaf82c426ed0c88c7dfffc2bc4187abceb61d (diff)
downloadadvtrains-401082503185381c2eec9dc0af6fa44caf846e5e.tar.gz
advtrains-401082503185381c2eec9dc0af6fa44caf846e5e.tar.bz2
advtrains-401082503185381c2eec9dc0af6fa44caf846e5e.zip
fix error in real train index calculation
-rw-r--r--wagons.lua2
1 files changed, 1 insertions, 1 deletions
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