]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add support for LMS with items 956/head
authorbones_was_here <bones_was_here@xa.org.au>
Fri, 17 Dec 2021 08:41:43 +0000 (18:41 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Fri, 17 Dec 2021 08:55:25 +0000 (18:55 +1000)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc

index 17b90c624fde8f8af9a50534ad5e69fae6e27ead..62570e5239e86bbd3b749efe7b20b036d67abec2 100644 (file)
@@ -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"
 
 
index 8f545955caefc20137883d1d15f9c066ec610eb5..43bf50621e85882ede0ad34976d999df6859757b 100644 (file)
@@ -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)