aboutsummaryrefslogtreecommitdiff
path: root/advtrains/path.lua
diff options
context:
space:
mode:
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