aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/lzb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/lzb.lua')
-rw-r--r--advtrains_interlocking/lzb.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_interlocking/lzb.lua b/advtrains_interlocking/lzb.lua
index 1746cc0..18fda55 100644
--- a/advtrains_interlocking/lzb.lua
+++ b/advtrains_interlocking/lzb.lua
@@ -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