From 6ea3341b0637b2892105827f09de9405c13c8675 Mon Sep 17 00:00:00 2001 From: Lonsfor Date: Sat, 14 May 2022 07:33:03 +0200 Subject: [PATCH] better init logic + make sure we are not in battle --- leaderboard.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/leaderboard.lua b/leaderboard.lua index ef223fc..d4b20d4 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -321,12 +321,15 @@ local function ingame() end local function initLeaderboard(player) - if disable and leveltime < START_TIME then - disable = ingame() > 1 + if cv_enable.value and G_RaceGametype() then + if disable and leveltime < START_TIME then + disable = ingame() > 1 + else + disable = $ or ingame() > 1 + end else - disable = disable or ingame() > 1 + disable = true end - disable = $ or not cv_enable.value -- Restore encore mode to initial value if disable and EncoreInitial != nil then