aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/trainlogic.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index a5323a9..fcf4eb0 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -298,7 +298,7 @@ function advtrains.train_ensure_init(id, train)
end
function advtrains.train_step_b(id, train, dtime)
- if train.no_step or train.wait_for_path then return end
+ if train.no_step or train.wait_for_path or not train.path then return end
-- in this code, we check variables such as path_trk_? and path_dist. We need to ensure that the path is known for the whole 'Train' zone
advtrains.path_get(train, atfloor(train.index + 2))
@@ -473,7 +473,7 @@ 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 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