aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-21 23:57:19 +0100
committerorwell96 <orwell@bleipb.de>2019-01-21 23:57:19 +0100
commit85f1600f53fb9beac4fa2cf29222a63d3fe470c7 (patch)
tree693ae01b7367286a0e6ff7dd5c69e7f938c5c6e0 /advtrains
parentf705feb4ee023506009fbe5b5eea0d714bff0b86 (diff)
downloadadvtrains-85f1600f53fb9beac4fa2cf29222a63d3fe470c7.tar.gz
advtrains-85f1600f53fb9beac4fa2cf29222a63d3fe470c7.tar.bz2
advtrains-85f1600f53fb9beac4fa2cf29222a63d3fe470c7.zip
Workaround
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/trainlogic.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index fcf4eb0..585b571 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -473,12 +473,15 @@ function advtrains.train_step_b(id, train, dtime)
end
function advtrains.train_step_c(id, train, dtime)
-if train.no_step or train.wait_for_path or not train.path then return end
+ if train.no_step or train.wait_for_path or not train.path then return end
-- all location/extent-critical actions have been done.
-- calculate the new occupation window
run_callbacks_update(id, train)
+ -- Return if something(TM) damaged the path
+ if train.no_step or train.wait_for_path or not train.path then return end
+
advtrains.path_clear_unused(train)
advtrains.path_setrestore(train)