Try to track down why ATC is broken
This commit is contained in:
parent
aee7f0d419
commit
227a4aaeac
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue