From 33c839b40d48e154f5b03619a9bdce1bed1fc602 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 10 Oct 2018 21:49:52 +0200 Subject: Add signal safety control override, restructure control system --- advtrains/path.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'advtrains/path.lua') diff --git a/advtrains/path.lua b/advtrains/path.lua index 19b4e78..5c3db94 100644 --- a/advtrains/path.lua +++ b/advtrains/path.lua @@ -260,7 +260,7 @@ function advtrains.path_get_index_by_offset(train, index, offset) --atdebug("pibo: 2 off=",off,"idx=",idx) -- then walk the path forward until we would overshoot while off - train.path_dist[idx] >= 0 do - idx = idx - 1 + idx = idx + 1 advtrains.path_get_adjacent(train, idx) if not train.path_dist[idx] then for i=-5,5 do -- cgit v1.2.3