diff options
author | orwell96 <orwell@bleipb.de> | 2020-06-16 16:11:35 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-02-10 16:36:24 +0100 |
commit | 114b915518190e112c7aa8f94a86f3e19660bd6e (patch) | |
tree | 176bf22c4d28c30bef8948e01601e0bb50dff1d1 /advtrains/lzb.lua | |
parent | 61329c11a28ca0d68f95f189d3a66c373d7dddc3 (diff) | |
download | advtrains-114b915518190e112c7aa8f94a86f3e19660bd6e.tar.gz advtrains-114b915518190e112c7aa8f94a86f3e19660bd6e.tar.bz2 advtrains-114b915518190e112c7aa8f94a86f3e19660bd6e.zip |
Fix new green signals bug caused by old trav_lzbdata, and callback loop in signalling formspec
Diffstat (limited to 'advtrains/lzb.lua')
-rw-r--r-- | advtrains/lzb.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains/lzb.lua b/advtrains/lzb.lua index ca92170..a5e361c 100644 --- a/advtrains/lzb.lua +++ b/advtrains/lzb.lua @@ -69,6 +69,7 @@ local function resolve_latest_lzbdata(ckp, index) if ckpi.index <= index and ckpi.lzbdata then return ckpi.lzbdata end + i=i-1 end return {} end @@ -197,6 +198,8 @@ function advtrains.lzb_invalidate_ahead(train, start_idx) end end train.lzb.trav_index = idx + -- FIX reset trav_lzbdata (look_ahead fetches these when required) + train.lzb.trav_lzbdata = nil -- re-apply all checkpoints to path_speed train.path_speed = {} for _,ckp in ipairs(train.lzb.checkpoints) do |