From f1a8b4f505313f3b2c37ced2dd3402e2740889fb Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 25 Oct 2017 11:49:34 +0200 Subject: Implement multi-occupation in detector.on_node table to finally fix collisions --- advtrains_luaautomation/atc_rail.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains_luaautomation/atc_rail.lua') 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 -- cgit v1.2.3