aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-04 19:27:44 +0100
committerorwell96 <orwell@bleipb.de>2018-12-04 19:27:44 +0100
commite37f4f9188808c3a91be55ba90b9b666341af3cf (patch)
tree053df6526e0e13f57fde063d2cb32277d722d5ba
parente1a8a2e974205c7a0ad2da2c3284a2a782865528 (diff)
downloadadvtrains-e37f4f9188808c3a91be55ba90b9b666341af3cf.tar.gz
advtrains-e37f4f9188808c3a91be55ba90b9b666341af3cf.tar.bz2
advtrains-e37f4f9188808c3a91be55ba90b9b666341af3cf.zip
Apply speed restriction 0.5 indexes later, do not cap tarvelocity by speed_restriction
-rw-r--r--advtrains/trainlogic.lua6
-rw-r--r--advtrains_interlocking/lzb.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/advtrains/trainlogic.lua b/advtrains/trainlogic.lua
index 8cfad4c..a55c5dc 100644
--- a/advtrains/trainlogic.lua
+++ b/advtrains/trainlogic.lua
@@ -390,9 +390,9 @@ function advtrains.train_step_b(id, train, dtime)
end
end
- if tarvel_cap and train.tarvelocity and tarvel_cap<train.tarvelocity then
- train.tarvelocity=tarvel_cap
- end
+ --if tarvel_cap and train.tarvelocity and tarvel_cap<train.tarvelocity then
+ -- train.tarvelocity=tarvel_cap
+ --end
local tmp_lever
diff --git a/advtrains_interlocking/lzb.lua b/advtrains_interlocking/lzb.lua
index 18fda55..14c1741 100644
--- a/advtrains_interlocking/lzb.lua
+++ b/advtrains_interlocking/lzb.lua
@@ -162,7 +162,7 @@ local function apply_control(id, train)
local i = 1
while i<=#lzb.oncoming do
- if lzb.oncoming[i].idx < train.index then
+ if lzb.oncoming[i].idx < train.index-0.5 then
if not lzb.oncoming[i].npr then
train.speed_restriction = lzb.oncoming[i].spd
end