Hm, forget about it for now. Might be perfectly valid when train goes farther than train length in step
This commit is contained in:
parent
b5f8737095
commit
d3b2f614be
@ -30,7 +30,7 @@ function atc.train_set_command(train, command, arrow)
|
|||||||
train.atc_command = command
|
train.atc_command = command
|
||||||
end
|
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)
|
local pts=minetest.pos_to_string(pos)
|
||||||
if atc.controllers[pts] then
|
if atc.controllers[pts] then
|
||||||
--atprint("Called send_command at "..pts)
|
--atprint("Called send_command at "..pts)
|
||||||
@ -73,9 +73,10 @@ function atc.send_command(pos, par_tid, train_id_temp_debug)
|
|||||||
else
|
else
|
||||||
atwarn("ATC rail at", pos, ": Sending command failed: There's no train at this position. This seems to be a bug.")
|
atwarn("ATC rail at", pos, ": Sending command failed: There's no train at this position. This seems to be a bug.")
|
||||||
-- huch
|
-- huch
|
||||||
local train = advtrains.trains[train_id_temp_debug]
|
--local train = advtrains.trains[train_id_temp_debug]
|
||||||
atlog("Train speed is",train.velocity,", have moved",train.dist_moved_this_step,", lever",train.lever)
|
--atlog("Train speed is",train.velocity,", have moved",train.dist_moved_this_step,", lever",train.lever)
|
||||||
advtrains.path_print(train, atlog)
|
--advtrains.path_print(train, atlog)
|
||||||
|
-- TODO track again when ATC bugs occur...
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -159,7 +160,7 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
|
|||||||
end,
|
end,
|
||||||
advtrains = {
|
advtrains = {
|
||||||
on_train_enter = function(pos, train_id)
|
on_train_enter = function(pos, train_id)
|
||||||
atc.send_command(pos, nil, train_id)
|
atc.send_command(pos, train_id)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user