From 3440f317ec142dd28f938dfd76ef3c8352680055 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 17 Dec 2021 18:41:43 +1000 Subject: [PATCH] Add support for LMS with items --- gamemodes-server.cfg | 1 + qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 17b90c624..62570e523 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -448,6 +448,7 @@ set g_lms_extra_lives 0 set g_lms_regenerate 0 set g_lms_last_join 3 "if g_lms_join_anytime is 0, new players can only join if the worst active player has (fraglimit - g_lms_last_join) or more lives; in other words, new players can no longer join once the worst player loses more than g_lms_last_join lives" set g_lms_join_anytime 1 "1: new players can join, but get same amount of lives as the worst player; 0: new players can only join if the worst active player has (fraglimit - g_lms_last_join) or more lives" +set g_lms_items 0 "enables items to spawn, weaponarena still disables weapons and ammo (to force all items to spawn, use g_pickup_items 1 instead)" set g_lms_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena" diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index 8f545955c..43bf50621 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -9,6 +9,7 @@ int autocvar_g_lms_extra_lives; bool autocvar_g_lms_join_anytime; int autocvar_g_lms_last_join; +bool autocvar_g_lms_items; bool autocvar_g_lms_regenerate; // main functions @@ -414,6 +415,9 @@ MUTATOR_HOOKFUNCTION(lms, ForbidPlayerScore_Clear) MUTATOR_HOOKFUNCTION(lms, FilterItemDefinition) { + if (autocvar_g_lms_items) + return false; + entity definition = M_ARGV(0, entity); if (autocvar_g_lms_extra_lives && definition == ITEM_ExtraLife) -- 2.39.2