From 190f94b2b97516b04125203a95d8b3b3ed8e82e9 Mon Sep 17 00:00:00 2001 From: Not Date: Mon, 28 Mar 2022 13:09:23 +0200 Subject: [PATCH] v1.2.2 --- leaderboard.lua | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/leaderboard.lua b/leaderboard.lua index 6f5ed5e..249ca26 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -127,11 +127,13 @@ local function exitlevel(player, ...) end COM_AddCommand("exit", exitlevel) -COM_AddCommand("spba_clearcheats", function(player) +local function clearcheats(player) + if not player.spectator then clearcheats = true CONS_Printf(player, "SPB Attack cheats will be cleared on next round") end -) +end +COM_AddCommand("spba_clearcheats", clearcheats) --DEBUGGING --local function printTable(tb) @@ -332,7 +334,7 @@ local function saveTime(player) gamemap, player.name, player.mo.skin, - player.mo.color, + player.skincolor, timeFinished, splits, Flags @@ -416,7 +418,7 @@ local function think() if leveltime < startTime then Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS) - if server.SPBArunning then + if leveltime > startTime - (3 * TICRATE) / 2 and server.SPBArunning then Flags = $ | F_SPBATK if server.SPBAexpert then Flags = $ | F_SPBEXP @@ -430,11 +432,13 @@ local function think() end end for p in players.iterate do - if p.SPBAKARTBIG then - Flags = $ | F_SPBBIG - end - if p.SPBAjustice then - Flags = $ | F_SPBJUS + if not p.spectator then + if p.SPBAKARTBIG then + Flags = $ | F_SPBBIG + end + if p.SPBAjustice then + Flags = $ | F_SPBJUS + end end end end