crylink: when a projectile explodes on world, not on player, don't detonate the other...
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 9 Nov 2010 12:24:45 +0000 (13:24 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 9 Nov 2010 12:24:45 +0000 (13:24 +0100)
qcsrc/server/w_crylink.qc

index 44e3967..86306e5 100644 (file)
@@ -92,12 +92,20 @@ void W_Crylink_Touch2 (void)
                f = cvar("g_balance_crylink_secondary_bouncedamagefactor");
        if(a)
                f *= a;
-       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other) || finalhit)
+       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other))
        {
                W_Crylink_LinkExplode(self.queuenext, self);
                remove (self);
                return;
        }
+       else if(finalhit)
+       {
+               // just unlink
+               self.queuenext.queueprev = self.queueprev;
+               self.queueprev.queuenext = self.queuenext;
+               remove(self);
+               return;
+       }
        self.cnt = self.cnt - 1;
        self.angles = vectoangles(self.velocity);
        self.owner = world;