aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-06-12 12:32:02 +0200
committerorwell96 <orwell@bleipb.de>2021-02-10 16:36:24 +0100
commitd3b2f614be059e65869a615fe319118c0a354995 (patch)
tree0bbf1deccd918ed43bf761442fc813dd35541c31
parentb5f87370950f17a9ea40802415526762dba7994b (diff)
downloadadvtrains-d3b2f614be059e65869a615fe319118c0a354995.tar.gz
advtrains-d3b2f614be059e65869a615fe319118c0a354995.tar.bz2
advtrains-d3b2f614be059e65869a615fe319118c0a354995.zip
Hm, forget about it for now. Might be perfectly valid when train goes farther than train length in step
-rw-r--r--advtrains/atc.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua
index 286a9b0..4f8b937 100644
--- a/advtrains/atc.lua
+++ b/advtrains/atc.lua
@@ -30,7 +30,7 @@ function atc.train_set_command(train, command, arrow)
train.atc_command = command
end
-function atc.send_command(pos, par_tid, train_id_temp_debug)
+function atc.send_command(pos, par_tid)
local pts=minetest.pos_to_string(pos)
if atc.controllers[pts] then
--atprint("Called send_command at "..pts)
@@ -73,9 +73,10 @@ function atc.send_command(pos, par_tid, train_id_temp_debug)
else
atwarn("ATC rail at", pos, ": Sending command failed: There's no train at this position. This seems to be a bug.")
-- huch
- local train = advtrains.trains[train_id_temp_debug]
- atlog("Train speed is",train.velocity,", have moved",train.dist_moved_this_step,", lever",train.lever)
- advtrains.path_print(train, atlog)
+ --local train = advtrains.trains[train_id_temp_debug]
+ --atlog("Train speed is",train.velocity,", have moved",train.dist_moved_this_step,", lever",train.lever)
+ --advtrains.path_print(train, atlog)
+ -- TODO track again when ATC bugs occur...
end
else
@@ -159,7 +160,7 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
end,
advtrains = {
on_train_enter = function(pos, train_id)
- atc.send_command(pos, nil, train_id)
+ atc.send_command(pos, train_id)
end,
},
}