]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to allow monsters to drop their items in CTS (off by default), fixes...
authorMario <mario.mario@y7mail.com>
Sat, 12 Nov 2022 03:49:26 +0000 (13:49 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 12 Nov 2022 03:49:26 +0000 (13:49 +1000)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc

index 4afd6310fc34bfb6cdabd4fccf7b4efed56a6062..56dcb02ebedb4f16e023463c93cb6e74e2bc9306 100644 (file)
@@ -326,6 +326,7 @@ set g_cts_selfdamage 1 "0 = disable all selfdamage and falldamage in cts"
 set g_cts_finish_kill_delay 2 "kill player this many seconds after stage completion to prevent cheating by starting out with more speed than otherwise possible; set it to 0 to not kill or to -1 to kill instantly"
 set g_cts_send_rankings_cnt 15 "send this number of map records to clients"
 set g_cts_removeprojectiles 0 "remove projectiles when the player dies, to prevent using weapons earlier in the stage than intended"
+set g_cts_drop_monster_items 0 "allow killed monsters to drop their items"
 
 
 // ==========================
index 56de4a90cf86d9912b532331bfb7ce622996b2e8..0fbab7ae51f54159e1913b7fe723bd4795b77ed4 100644 (file)
@@ -12,6 +12,7 @@
 float autocvar_g_cts_finish_kill_delay;
 bool autocvar_g_cts_selfdamage;
 bool autocvar_g_cts_removeprojectiles;
+bool autocvar_g_cts_drop_monster_items;
 
 // legacy bot roles
 .float race_checkpoint;
@@ -284,6 +285,8 @@ MUTATOR_HOOKFUNCTION(cts, FilterItem)
 
        if (Item_IsLoot(item))
        {
+               if(item.monster_loot && autocvar_g_cts_drop_monster_items)
+                       return false;
                return true;
        }
 }