aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainlogic.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-12-18 23:44:01 +0100
committerorwell96 <orwell@bleipb.de>2017-12-18 23:44:01 +0100
commite3b70469687116437e90aedf0b0be61cf4a8dc3e (patch)
treebf631aff79a4c3710ef20a13ac11abec7c2ab756 /advtrains/trainlogic.lua
parent8a51a10a61626c2190b32f06a52dbe20cdf1d04c (diff)
downloadadvtrains-e3b70469687116437e90aedf0b0be61cf4a8dc3e.tar.gz
advtrains-e3b70469687116437e90aedf0b0be61cf4a8dc3e.tar.bz2
advtrains-e3b70469687116437e90aedf0b0be61cf4a8dc3e.zip
Remove path invalidation statement.
Caused problems on multiple detector rails in a row, because paths got cleared in-between a train step Also optimize some code
Diffstat (limited to 'advtrains/trainlogic.lua')
-rw-r--r--advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index d98c9e8..a72d246 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -433,7 +433,7 @@ function advtrains.train_step_b(id, train, dtime)
--hacky fix: if train_step_a returned in phase 2, end_index may not be set.
--just return
- if not train.end_index then
+ if not train.index or not train.end_index then
return
end