diff options
author | ywang <yw05@forksworld.de> | 2020-01-12 18:11:18 +0100 |
---|---|---|
committer | ywang <yw05@forksworld.de> | 2020-01-12 18:11:18 +0100 |
commit | 7033271a1073e1735dc558b4b4770e7a45564b44 (patch) | |
tree | 6f5716ba7f212d9a046d1155d6140481dea9ed4b /advtrains | |
parent | 2dd280b93146fad9edca072a1ccdeb2b7b979691 (diff) | |
download | advtrains-7033271a1073e1735dc558b4b4770e7a45564b44.tar.gz advtrains-7033271a1073e1735dc558b4b4770e7a45564b44.tar.bz2 advtrains-7033271a1073e1735dc558b4b4770e7a45564b44.zip |
Fix problem related to long distance between train and LZB pointh137-rc1
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/lzb.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/advtrains/lzb.lua b/advtrains/lzb.lua index 794ad42..da3b4b6 100644 --- a/advtrains/lzb.lua +++ b/advtrains/lzb.lua @@ -96,8 +96,10 @@ function advtrains.lzb_get_limit_zone(train, lzb, lever, vel) elseif v0 <= 0 then s = s + params.ADD_STAND else s = s + params.ADD_SLOW end - if lvr >= 2 then s = s + params.ZONE_HOLD end - if lvr >= 3 then s = s + params.ZONE_ROLL end + if v0 >= params.ZONE_VSLOW then + if lvr >= 2 then s = s + params.ZONE_HOLD end + if lvr >= 3 then s = s + params.ZONE_ROLL end + end return advtrains.path_get_index_by_offset(train, lzb.idx, -s) end |