Do not set speed_restriction for npr

master
orwell96 2018-12-04 00:17:54 +01:00
parent dd0c52d9aa
commit e1a8a2e974
1 changed files with 3 additions and 1 deletions

View File

@ -163,7 +163,9 @@ local function apply_control(id, train)
local i = 1 local i = 1
while i<=#lzb.oncoming do while i<=#lzb.oncoming do
if lzb.oncoming[i].idx < train.index then if lzb.oncoming[i].idx < train.index then
train.speed_restriction = lzb.oncoming[i].spd if not lzb.oncoming[i].npr then
train.speed_restriction = lzb.oncoming[i].spd
end
table.remove(lzb.oncoming, i) table.remove(lzb.oncoming, i)
else else
i = i + 1 i = i + 1