]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_crylink.qc
Get rid of bouncestop and bouncefactor for electro for now (not worht the fuzz) ...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_crylink.qc
index 747dc4edc728e4942d9d065e3c5be6b72e91b140..758a2577cbcd506febc055201a50049c77593551 100644 (file)
@@ -149,14 +149,29 @@ void W_Crylink_LinkJoinEffect_Think()
                if(n >= 2)
                {
 
-                       if(cvar("g_balance_crylink_primary_joinexplode"))
+                       
+                       if(e.projectiledeathtype & HITTYPE_SECONDARY)
                        {
-                               n = n / cvar("g_balance_crylink_primary_shots");
-                               RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_joinexplode_damage") * n, 
-                                                               cvar("g_balance_crylink_primary_joinexplode_edgedamage") * n, 
-                                                               cvar("g_balance_crylink_primary_joinexplode_radius") * n, world, 
-                                                               cvar("g_balance_crylink_primary_joinexplode_force") * n, e.projectiledeathtype, other);
+                               if(cvar("g_balance_crylink_secondary_joinexplode"))
+                               {
+                                       n = n / cvar("g_balance_crylink_secondary_shots");
+                                       RadiusDamage (e, e.realowner, cvar("g_balance_crylink_secondary_joinexplode_damage") * n, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_edgedamage") * n, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_radius") * n, world, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_force") * n, e.projectiledeathtype, other);
+                               }                               
                        }
+                       else
+                       {
+                               if(cvar("g_balance_crylink_primary_joinexplode"))
+                               {
+                                       n = n / cvar("g_balance_crylink_primary_shots");
+                                       RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_joinexplode_damage") * n, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_edgedamage") * n, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_radius") * n, world, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_force") * n, e.projectiledeathtype, other);
+                               }                               
+                       }                       
                        
                        // they seem to touch...
                        // TODO make a specific particle effect for this
@@ -166,6 +181,7 @@ void W_Crylink_LinkJoinEffect_Think()
        remove(self);
 }
 
+
 // NO bounce protection, as bounces are limited!
 void W_Crylink_Touch (void)
 {
@@ -486,22 +502,27 @@ float w_crylink(float req)
                                if(self.crylink_lastgroup)
                                {
                                        vector pos;
+                                       entity linkjoineffect;
+                                       
+                                       
                                        if(self.crylink_waitrelease == 1)
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), cvar("g_balance_crylink_primary_jointime"));
+                                               
                                        }
                                        else
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"), cvar("g_balance_crylink_secondary_jointime"));
                                        }
-
-                                       entity linkjoineffect;
+                                       
                                        linkjoineffect = spawn();
-                                       linkjoineffect.classname = "linkjoineffect";
                                        linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
+                                       linkjoineffect.classname = "linkjoineffect";                                    
                                        linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
                                        linkjoineffect.owner = self;
                                        setorigin(linkjoineffect, pos);
+
+
                                }
                                self.crylink_waitrelease = 0;
                                if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))