aboutsummaryrefslogtreecommitdiff
path: root/advtrains/path.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-10-10 21:49:52 +0200
committerorwell96 <orwell@bleipb.de>2018-10-10 21:49:52 +0200
commit33c839b40d48e154f5b03619a9bdce1bed1fc602 (patch)
tree9250365caab7ae75812421bf614f7de0f09d5014 /advtrains/path.lua
parent8f8f009425a4d3341d3d00e6a537b5af320b5639 (diff)
downloadadvtrains-33c839b40d48e154f5b03619a9bdce1bed1fc602.tar.gz
advtrains-33c839b40d48e154f5b03619a9bdce1bed1fc602.tar.bz2
advtrains-33c839b40d48e154f5b03619a9bdce1bed1fc602.zip
Add signal safety control override, restructure control system
Diffstat (limited to 'advtrains/path.lua')
-rw-r--r--advtrains/path.lua2
1 files changed, 1 insertions, 1 deletions
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