]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
asplode grenades properly when hitting non-bouncable surfaces
authorRudolf Polzer <divVerent@alientrap.org>
Fri, 3 Sep 2010 15:39:14 +0000 (17:39 +0200)
committerRudolf Polzer <divVerent@alientrap.org>
Fri, 3 Sep 2010 15:39:14 +0000 (17:39 +0200)
qcsrc/server/w_grenadelauncher.qc

index b39b3a23de06508fa63e146af38e3c7aa18cfa46..33a6ca5aa3b3deadedd8a21f0aee51df2c6fcff3 100644 (file)
@@ -55,7 +55,7 @@ void W_Grenade_Damage (entity inflictor, entity attacker, float damage, float de
 void W_Grenade_Touch1 (void)
 {
        PROJECTILE_TOUCH;
-       if(cvar("g_balance_grenadelauncher_primary_sticky") && other == world && other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)
+       if(cvar("g_balance_grenadelauncher_primary_sticky") && other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
 
@@ -78,7 +78,7 @@ void W_Grenade_Touch1 (void)
 void W_Grenade_Touch2 (void)
 {
        PROJECTILE_TOUCH;
-       if(cvar("g_balance_grenadelauncher_secondary_sticky") && other == world && other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)
+       if(cvar("g_balance_grenadelauncher_secondary_sticky") && other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
 
@@ -96,7 +96,7 @@ void W_Grenade_Touch2 (void)
        }
        else
        {
-               if (other.takedamage == DAMAGE_AIM)
+               if (cvar("g_balance_grenadelauncher_secondary_sticky") || other.takedamage == DAMAGE_AIM)
                {
                        self.use ();
                }