aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--advtrains/advtrains/trainlogic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/advtrains/trainlogic.lua b/advtrains/advtrains/trainlogic.lua
index d2c86a4..df7df14 100644
--- a/advtrains/advtrains/trainlogic.lua
+++ b/advtrains/advtrains/trainlogic.lua
@@ -406,7 +406,7 @@ function advtrains.pathpredict(id, train)
maxn=advtrains.maxN(train.path)
end
- local minn=train.min_index_on_track or 0
+ local minn=train.min_index_on_track or -1
while (train.index-minn) < (train.trainlen or 0) + pregen_back do --post_generate. has to be at least trainlen. (we let go of the exact calculation here since this would be unuseful here)
--atprint("minn conway for ",minn,minetest.pos_to_string(path[minn]),minn+1,minetest.pos_to_string(path[minn+1]))
local conway=advtrains.conway(train.path[minn], train.path[minn+1], train.drives_on)