Do not set speed_restriction for npr

This commit is contained in:
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
while i<=#lzb.oncoming do
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)
else
i = i + 1