aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains_luaautomation/atc_rail.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 1fae28d..b90baf8 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -24,7 +24,7 @@ function r.fire_event(pos, evtdata)
--prepare ingame API for ATC. Regenerate each time since pos needs to be known
--If no train, then return false.
- local train_id=advtrains.detector.on_node[ph]
+ local train_id=advtrains.detector.get(pos)
local train, atc_arrow, tvel
if train_id then train=advtrains.trains[train_id] end
if train then