From 4cfd07e992ae44ac9d06c4936df9dc8d71ac905b Mon Sep 17 00:00:00 2001 From: orwell Date: Thu, 1 Aug 2024 22:13:26 +0200 Subject: Remove superfluous train_id check from reverse_lookup Reported by Sebastien F4GRX, thank you! --- advtrains/occupation.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'advtrains/occupation.lua') diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua index 7fce312..26e1f79 100644 --- a/advtrains/occupation.lua +++ b/advtrains/occupation.lua @@ -159,10 +159,8 @@ function o.reverse_lookup(ppos) local r = {} local i = 1 while t[i] do - if t[i]~=train_id then - if not r[t[i]] then r[t[i]] = {} end - table.insert(r[t[i]], t[i+1]) - end + if not r[t[i]] then r[t[i]] = {} end + table.insert(r[t[i]], t[i+1]) i = i + 2 end return r -- cgit v1.2.3