aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainlogic.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 12:11:14 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 12:11:14 +0100
commitdac65af9839f05aa2b79ad87c3c53118149d54cb (patch)
tree6afd5de2e6abbe919645f69f11497b54efd02ce1 /advtrains/trainlogic.lua
parent48e52f054697a4deaf5ac98a3aff9984a63dfa16 (diff)
downloadadvtrains-dac65af9839f05aa2b79ad87c3c53118149d54cb.tar.gz
advtrains-dac65af9839f05aa2b79ad87c3c53118149d54cb.tar.bz2
advtrains-dac65af9839f05aa2b79ad87c3c53118149d54cb.zip
Revert "Debugging code to trace down path_invalidate within callbacks error"
This reverts commit 1965e846b6c61958063ea13e2ac88ae18b701d09.
Diffstat (limited to 'advtrains/trainlogic.lua')
-rw-r--r--advtrains/trainlogic.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index c129409..e7d8465 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -472,11 +472,7 @@ function advtrains.train_step_c(id, train, dtime)
run_callbacks_update(id, train)
-- Return if something(TM) damaged the path
- if not train.path then
- atwarn(id,"@train_step_c missing path")
- atwarn(advtrains.dbg_last_pathclear)
- return
- end
+ if train.no_step or train.wait_for_path or not train.path then return end
advtrains.path_clear_unused(train)
@@ -608,11 +604,6 @@ advtrains.te_register_on_new_path(function(id, train)
end)
advtrains.te_register_on_update(function(id, train)
- if not train.path then
- atwarn(id,"@register_on_update missing path")
- atwarn(advtrains.dbg_last_pathclear)
- return
- end
local new_index = atround(train.index)
local new_end_index = atround(train.end_index)
local old_index = train.tnc.old_index