Remove superfluous train_id check from reverse_lookup

Reported by Sebastien F4GRX, thank you!
This commit is contained in:
orwell 2024-08-01 22:13:26 +02:00
parent 216f28e51a
commit 4cfd07e992
1 changed files with 2 additions and 4 deletions

View File

@ -159,10 +159,8 @@ function o.reverse_lookup(ppos)
local r = {} local r = {}
local i = 1 local i = 1
while t[i] do while t[i] do
if t[i]~=train_id then
if not r[t[i]] then r[t[i]] = {} end if not r[t[i]] then r[t[i]] = {} end
table.insert(r[t[i]], t[i+1]) table.insert(r[t[i]], t[i+1])
end
i = i + 2 i = i + 2
end end
return r return r