From 7d664c387e6a227cb4e199260dd64b4d956e7355 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Tue, 3 Aug 2021 20:18:07 +0200 Subject: [PATCH] Fix force join in LMS --- gamemodes-server.cfg | 1 + qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 77a6d735d..cf5016389 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -449,6 +449,7 @@ set g_lms_regenerate 0 set g_lms_last_join 3 "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives" set g_lms_join_anytime 1 "if true, new players can join, but get same amount of lives as the worst player" set g_lms_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena" +set g_lms_forcejoin 0 "if true, new players are forced to join in the game" // ========= diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index dc18b7c90..27f50484b 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -10,6 +10,7 @@ int autocvar_g_lms_extra_lives; bool autocvar_g_lms_join_anytime; int autocvar_g_lms_last_join; bool autocvar_g_lms_regenerate; +bool autocvar_g_lms_forcejoin; // main functions int LMS_NewPlayerLives() @@ -267,11 +268,12 @@ MUTATOR_HOOKFUNCTION(lms, ClientConnect) } } -// FIXME LMS doesn't allow clients to spectate due to its particular implementation +// LMS doesn't allow clients to spectate due to its particular implementation MUTATOR_HOOKFUNCTION(lms, AutoJoinOnConnection) { - if(autocvar_g_campaign) + if(autocvar_g_campaign || !autocvar_g_lms_forcejoin) return false; + return true; } -- 2.39.2