Compare commits
3 Commits
57120e257a
...
9d50705d9a
Author | SHA1 | Date | |
---|---|---|---|
9d50705d9a | |||
935d119e4d | |||
172b9d3633 |
19
lb_store.lua
19
lb_store.lua
@ -353,16 +353,13 @@ COM_AddCommand("lb_write_checksums", function(player)
|
||||
end, COM_ADMIN)
|
||||
|
||||
COM_AddCommand("lb_known_maps", function(player, map)
|
||||
if not map then
|
||||
CONS_Printf(player, "Usage: <map>")
|
||||
CONS_Printf(player, "Print all known checksums under <map>")
|
||||
return
|
||||
end
|
||||
|
||||
local mapnum = mapnumFromExtended(map)
|
||||
if not mapnum then
|
||||
CONS_Printf(player, string.format("invalid map '%s'", map))
|
||||
return
|
||||
local mapnum = gamemap
|
||||
if map then
|
||||
mapnum = mapnumFromExtended(map)
|
||||
if not mapnum then
|
||||
CONS_Printf(player, string.format("invalid map '%s'", map))
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local known = {}
|
||||
@ -380,7 +377,7 @@ COM_AddCommand("lb_known_maps", function(player, map)
|
||||
|
||||
CONS_Printf(player, "Map Chck Records")
|
||||
for checksum, count in pairs(known) do
|
||||
CONS_Printf(player, string.format("%s %s %d", map, checksum, count))
|
||||
CONS_Printf(player, string.format("%s %s %d", G_BuildMapName(mapnum), checksum, count))
|
||||
end
|
||||
end)
|
||||
|
||||
|
@ -686,7 +686,7 @@ local function moveRecords(player, from_map, from_checksum, to_map, to_checksum)
|
||||
|
||||
CONS_Printf(player, "Please repack coldstore and restart the server for changes to take effect.")
|
||||
end
|
||||
COM_AddCommand("lb_move_records", moveRecords)
|
||||
COM_AddCommand("lb_move_records", moveRecords, COM_ADMIN)
|
||||
|
||||
--DEBUGGING
|
||||
--local function printTable(tb)
|
||||
@ -1197,12 +1197,12 @@ local function saveTime(player)
|
||||
end
|
||||
|
||||
-- DEBUGGING
|
||||
local function saveLeaderboard(player, ...)
|
||||
TimeFinished = tonumber(... or player.realtime)
|
||||
splits = {1000, 2000, 3000}
|
||||
saveTime(player)
|
||||
end
|
||||
COM_AddCommand("save", saveLeaderboard)
|
||||
--local function saveLeaderboard(player, ...)
|
||||
-- TimeFinished = tonumber(... or player.realtime)
|
||||
-- splits = {1000, 2000, 3000}
|
||||
-- saveTime(player)
|
||||
--end
|
||||
--COM_AddCommand("save", saveLeaderboard)
|
||||
|
||||
local function regLap(player)
|
||||
if player.laps > prevLap and TimeFinished == 0 then
|
||||
|
Loading…
x
Reference in New Issue
Block a user