]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/electro.qc
weapon independency fixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / electro.qc
index d80703175983b87eb0c046ffa68e42276aad0d4e..3a70920e07839ed32bee603e7ec368c640b9bac2 100644 (file)
@@ -10,6 +10,13 @@ void W_Electro_TriggerCombo(vector org, float rad, entity own)
        {
                if(e.classname == "electro_orb")
                {
+                       // check if the ball we are exploding is not owned by an
+                       // independent player which is not the player who shot the ball
+                       if(IS_INDEPENDENT_PLAYER(e.realowner) && own != e.realowner)
+                       {
+                               e = e.chain;
+                               continue;
+                       }
                        // do we allow thruwall triggering?
                        if(WEP_CVAR(electro, combo_comboradius_thruwall))
                        {
@@ -151,6 +158,13 @@ void W_Electro_Bolt_Think(entity this)
                {
                        if(e.classname == "electro_orb")
                        {
+                               // check if the ball we are exploding is not owned by an
+                               // independent player which is not the player who shot the ball
+                               if(IS_INDEPENDENT_PLAYER(e.realowner) && this.realowner != e.realowner)
+                               {
+                                       e = e.chain;
+                                       continue;
+                               }
                                bool explode;
                                if (this.owner == e.owner)
                                {