aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/atc.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua
index 0cb6019..a1be084 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)
+function atc.send_command(pos, par_tid, train_id_temp_debug)
local pts=minetest.pos_to_string(pos)
if atc.controllers[pts] then
--atprint("Called send_command at "..pts)
@@ -72,6 +72,8 @@ function atc.send_command(pos, par_tid)
end
else
atwarn("ATC rail at", pos, ": Sending command failed: There's no train at this position. This seems to be a bug.")
+ -- huch
+ advtrains.path_print(advtrains.trains[train_id_temp_debug], atdebug)
end
else
atwarn("ATC rail at", pos, ": Sending command failed: Entry for controller not found.")
@@ -154,7 +156,7 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
end,
advtrains = {
on_train_enter = function(pos, train_id)
- atc.send_command(pos)
+ atc.send_command(pos, nil, train_id)
end,
},
}