diff options
author | orwell <orwell@bleipb.de> | 2024-08-01 22:13:26 +0200 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-08-01 22:13:26 +0200 |
commit | 4cfd07e992ae44ac9d06c4936df9dc8d71ac905b (patch) | |
tree | 5b7abd7dcd006596af0dc0e9f617a6c6a86c079b | |
parent | 216f28e51aa3f8fea78f4fc054cb1071f3a9ce72 (diff) | |
download | advtrains-release-2.4.4.tar.gz advtrains-release-2.4.4.tar.bz2 advtrains-release-2.4.4.zip |
Remove superfluous train_id check from reverse_lookuprelease-2.4.4
Reported by Sebastien F4GRX, thank you!
-rw-r--r-- | advtrains/occupation.lua | 6 |
1 files changed, 2 insertions, 4 deletions
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 |