From: Mario Date: Mon, 11 Apr 2016 02:26:51 +0000 (+1000) Subject: Add an option to not push teammates with the vaporizer in instagib X-Git-Tag: xonotic-v0.8.2~965 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=39b0beab694f5db21c25c6cae6b2de5fc4c3f5e5;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to not push teammates with the vaporizer in instagib --- diff --git a/mutators.cfg b/mutators.cfg index 1d7ef303f..26132baef 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -35,6 +35,7 @@ set g_instagib_damagedbycontents 1 "allow damage from lava pits in instagib" set g_instagib_blaster_keepdamage 0 "allow secondary fire to hurt players" set g_instagib_blaster_keepforce 0 "allow secondary fire to push players" set g_instagib_mirrordamage 0 "allow damage mirror instagib" +set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primary attack" // ========== diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 1712a86d1..d27c32282 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -288,6 +288,9 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate) if(IS_PLAYER(frag_attacker)) if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER)) { + if(autocvar_g_instagib_friendlypush && SAME_TEAM(frag_target, frag_attacker)) + frag_force = '0 0 0'; + if(frag_target.armorvalue) { frag_target.armorvalue -= 1; diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index bf5fd0eaf..943efc404 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -221,6 +221,7 @@ bool autocvar_g_instagib_damagedbycontents = true; bool autocvar_g_instagib_blaster_keepdamage = false; bool autocvar_g_instagib_blaster_keepforce = false; bool autocvar_g_instagib_mirrordamage; +bool autocvar_g_instagib_friendlypush = true; #define autocvar_g_mirrordamage cvar("g_mirrordamage") #define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")