aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-08-01 22:13:26 +0200
committerorwell <orwell@bleipb.de>2024-08-01 22:13:26 +0200
commit4cfd07e992ae44ac9d06c4936df9dc8d71ac905b (patch)
tree5b7abd7dcd006596af0dc0e9f617a6c6a86c079b
parent216f28e51aa3f8fea78f4fc054cb1071f3a9ce72 (diff)
downloadadvtrains-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.lua6
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