group hell maps together

This commit is contained in:
Not 2022-09-03 00:12:57 +02:00
parent 2c11b1e0fc
commit 1f9c00202e
1 changed files with 11 additions and 1 deletions

View File

@ -358,12 +358,22 @@ rawset(_G, "InitBrowser", initBrowser)
-- initialize maps with racemaps only
local function loadMaps()
maps = {}
local hell = {}
for i = 0, #mapheaderinfo do
local map = mapheaderinfo[i]
if map and map.typeoflevel & TOL_RACE then
table.insert(maps, i)
if map.menuflags & LF2_HIDEINMENU then
table.insert(hell, i)
else
table.insert(maps, i)
end
end
end
-- append hell maps
for _, map in ipairs(hell) do
table.insert(maps, map)
end
end
addHook("MapLoad", loadMaps)