aboutsummaryrefslogtreecommitdiff
path: root/advtrains/occupation.lua
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 /advtrains/occupation.lua
parent216f28e51aa3f8fea78f4fc054cb1071f3a9ce72 (diff)
downloadadvtrains-4cfd07e992ae44ac9d06c4936df9dc8d71ac905b.tar.gz
advtrains-4cfd07e992ae44ac9d06c4936df9dc8d71ac905b.tar.bz2
advtrains-4cfd07e992ae44ac9d06c4936df9dc8d71ac905b.zip
Remove superfluous train_id check from reverse_lookuprelease-2.4.4
Reported by Sebastien F4GRX, thank you!
Diffstat (limited to 'advtrains/occupation.lua')
-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