From 07dca46c92a4e0363d2cb7d14f54daee98d14dee Mon Sep 17 00:00:00 2001 From: Not Date: Fri, 20 May 2022 17:09:16 +0200 Subject: [PATCH] force change level, enforce race mode --- leaderboard.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/leaderboard.lua b/leaderboard.lua index ef223fc..582769c 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -1152,11 +1152,13 @@ local function getGamer() end end +local function changeMap() + COM_BufInsertText(server, "map " + nextMap + " -force -gametype race") + nextMap = nil +end + local function think() - if nextMap then - COM_BufInsertText(server, "map " + nextMap) - nextMap = nil - end + if nextMap then changeMap() end if disable then if AntiAFK then @@ -1309,10 +1311,7 @@ end addHook("ThinkFrame", think) local function interThink() - if nextMap then - COM_BufInsertText(server, "map " + nextMap) - nextMap = nil - end + if nextMap then changeMap() end if not cv_teamchange then cv_teamchange = CV_FindVar("allowteamchange")