Add level selector / leaderboard browser #7

Merged
Not merged 23 commits from browser into master 2022-09-06 10:08:42 +02:00
Showing only changes of commit 1f9c00202e - Show all commits

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)