diff options
author | Y. Wang <yw05@forksworld.de> | 2021-12-04 18:51:06 +0100 |
---|---|---|
committer | Gabriel PĂ©rez-Cerezo <gabriel@gpcf.eu> | 2021-12-16 22:24:05 +0100 |
commit | 5912f778e1e4ed568a0874bc200d71f258624390 (patch) | |
tree | d6a8c98f38a872ffefb30bd698c718ce7851eb22 /advtrains | |
parent | 0b9441c28908f2d878d59cd0c363656115b27837 (diff) | |
download | advtrains-5912f778e1e4ed568a0874bc200d71f258624390.tar.gz advtrains-5912f778e1e4ed568a0874bc200d71f258624390.tar.bz2 advtrains-5912f778e1e4ed568a0874bc200d71f258624390.zip |
Fix speed sign allowing v>max_speed
Diffstat (limited to 'advtrains')
-rw-r--r-- | advtrains/trainlogic.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua index 53732a2..35c3726 100644 --- a/advtrains/trainlogic.lua +++ b/advtrains/trainlogic.lua @@ -392,7 +392,7 @@ function advtrains.train_step_b(id, train, dtime) -- interlocking speed restriction elseif train.speed_restriction then --atprint("in train_step_b: applying interlocking speed restriction",train.speed_restriction) - sit_v_cap = train.speed_restriction + sit_v_cap = math.min(sit_v_cap or math.huge, train.speed_restriction) end --apply off-track handling: |