]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Monster loot off-switch
authorDr. Jaska <drjaska83@gmail.com>
Wed, 10 May 2023 17:21:08 +0000 (17:21 +0000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 10 May 2023 17:21:08 +0000 (17:21 +0000)
monsters.cfg
qcsrc/common/monsters/sv_monsters.qc

index 94e25eb47d422eb1eb1eba6cd42ff751966746f8..b64c846e9cdb076206e7b54ce98e87a478d66ba0 100644 (file)
@@ -99,6 +99,7 @@ set g_monsters_think_delay 0.03333
 set g_monsters_skill 1 "Monster skill (affecting some of their attributes). 1 - easy, 2 - medium, 3 - hard, 4 - insane, 5 - nightmare"
 set g_monsters_miniboss_chance 5
 set g_monsters_miniboss_healthboost 100
+set g_monsters_drop 1
 set g_monsters_drop_time 10
 set g_monsters_ignoretraces 1
 set g_monsters_lineofsight 1
index 1635b5cb0d235c6eeb84dac673c18d98e9421e96..7d644fa368c7012d4d761518f3fc65d5029ea387 100644 (file)
@@ -36,9 +36,10 @@ void monsters_setstatus(entity this)
        STAT(MONSTERS_KILLED, this) = monsters_killed;
 }
 
+bool autocvar_g_monsters_drop = true;
 void monster_dropitem(entity this, entity attacker)
 {
-       if(!this.candrop || !this.monster_loot)
+       if(!this.candrop || !this.monster_loot || !autocvar_g_monsters_drop)
                return;
 
        vector org = CENTER_OR_VIEWOFS(this);
@@ -976,7 +977,7 @@ void Monster_Dead(entity this, entity attacker, float gibbed)
        Monster mon = this.monsterdef;
        mon.mr_death(mon, this);
 
-       if(this.candrop && this.weapon)
+       if(this.candrop && this.weapon && autocvar_g_monsters_drop)
        {
                .entity weaponentity = weaponentities[0]; // TODO: unhardcode
                W_ThrowNewWeapon(this, this.weapon, 0, this.origin, randomvec() * 150 + '0 0 325', weaponentity);