From: Mario Date: Sat, 25 Jun 2022 00:38:45 +0000 (+1000) Subject: If monsters are disabled use a regular nade explosion for pokenades, fixes #2703 X-Git-Tag: xonotic-v0.8.6~438^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=18e1dbfccdf7da3e9ff1888695403a29b267e01c;p=xonotic%2Fxonotic-data.pk3dir.git If monsters are disabled use a regular nade explosion for pokenades, fixes #2703 --- diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 5ea4cb49c..2d0a23409 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -675,9 +675,13 @@ void nade_heal_boom(entity this) void nade_monster_boom(entity this) { + if(!autocvar_g_monsters) + return; entity e = spawn(); e.noalign = true; // don't drop to floor e = spawnmonster(e, this.pokenade_type, MON_Null, this.realowner, this.realowner, this.origin, false, false, 1); + if(!e) + return; // monster failed to be spawned if(autocvar_g_nades_pokenade_monster_lifetime > 0) e.monster_lifetime = time + autocvar_g_nades_pokenade_monster_lifetime; @@ -732,6 +736,11 @@ void nade_boom(entity this) nade_blast = false; break; case NADE_TYPE_MONSTER: + if(!autocvar_g_monsters) + { + expef = EFFECT_NADE_EXPLODE(this.realowner.team); + break; // fall back to a standard nade explosion + } case NADE_TYPE_SPAWN: nade_blast = false; switch(this.realowner.team)