]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to not push teammates with the vaporizer in instagib
authorMario <mario@smbclan.net>
Mon, 11 Apr 2016 02:26:51 +0000 (12:26 +1000)
committerMario <mario@smbclan.net>
Mon, 11 Apr 2016 02:26:51 +0000 (12:26 +1000)
mutators.cfg
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/server/autocvars.qh

index 1d7ef303f9e511fa719310526d270c7482c61d46..26132baefad9cfa06456b3abd6e518b32ad9e576 100644 (file)
@@ -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"
 
 
 // ==========
index 1712a86d1692d68387f9a6c96f13d01ce11a7723..d27c32282b41fa6511405c0b79f61f4bc883f780 100644 (file)
@@ -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;
index bf5fd0eaf92cd67e20aae53dc800a33d003eeecd..943efc4042c5ec4008edd322ed42df621f441478 100644 (file)
@@ -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")