diff options
author | orwell96 <mono96.mml@gmail.com> | 2016-08-21 16:49:48 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2016-08-21 16:49:48 +0200 |
commit | 401082503185381c2eec9dc0af6fa44caf846e5e (patch) | |
tree | 4e0e361c46468594845f14acef8e2b856e60c05e | |
parent | 931aaf82c426ed0c88c7dfffc2bc4187abceb61d (diff) | |
download | advtrains-401082503185381c2eec9dc0af6fa44caf846e5e.tar.gz advtrains-401082503185381c2eec9dc0af6fa44caf846e5e.tar.bz2 advtrains-401082503185381c2eec9dc0af6fa44caf846e5e.zip |
fix error in real train index calculation
-rw-r--r-- | wagons.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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
|