Add level selector / leaderboard browser #7
10
browser.lua
10
browser.lua
@ -358,13 +358,23 @@ rawset(_G, "InitBrowser", initBrowser)
|
|||||||
-- initialize maps with racemaps only
|
-- initialize maps with racemaps only
|
||||||
local function loadMaps()
|
local function loadMaps()
|
||||||
maps = {}
|
maps = {}
|
||||||
|
local hell = {}
|
||||||
for i = 0, #mapheaderinfo do
|
for i = 0, #mapheaderinfo do
|
||||||
local map = mapheaderinfo[i]
|
local map = mapheaderinfo[i]
|
||||||
if map and map.typeoflevel & TOL_RACE then
|
if map and map.typeoflevel & TOL_RACE then
|
||||||
|
if map.menuflags & LF2_HIDEINMENU then
|
||||||
|
table.insert(hell, i)
|
||||||
|
else
|
||||||
table.insert(maps, i)
|
table.insert(maps, i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- append hell maps
|
||||||
|
for _, map in ipairs(hell) do
|
||||||
|
table.insert(maps, map)
|
||||||
|
end
|
||||||
|
end
|
||||||
addHook("MapLoad", loadMaps)
|
addHook("MapLoad", loadMaps)
|
||||||
|
|
||||||
local repeatCount = 0
|
local repeatCount = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user