]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/sv_monsters.qc
Monster loot off-switch
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qc
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);