From: Mario Date: Sat, 12 Nov 2022 03:49:26 +0000 (+1000) Subject: Add an option to allow monsters to drop their items in CTS (off by default), fixes... X-Git-Tag: xonotic-v0.8.6~246^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=93ca8559a994688451b3cafe9c9c718ed116b7e2;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to allow monsters to drop their items in CTS (off by default), fixes #2734 --- diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 4afd6310f..56dcb02eb 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -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" // ========================== diff --git a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc index 56de4a90c..0fbab7ae5 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc +++ b/qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc @@ -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; } }