]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
sticky grenades: only stick if hitting world, not if hitting e.g. a lift (then it...
authorRudolf Polzer <divverent@alientrap.org>
Wed, 1 Sep 2010 06:56:03 +0000 (08:56 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 1 Sep 2010 06:56:03 +0000 (08:56 +0200)
qcsrc/server/w_grenadelauncher.qc

index 64a987047c0307d0380e671d32910396b1faa33b..82a1870afafe8e796476feff76a741af3e57eeb0 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.takedamage != DAMAGE_AIM)
+       if(cvar("g_balance_grenadelauncher_primary_sticky") && other == world) // && other.takedamage != DAMAGE_AIM)
        {
                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.takedamage != DAMAGE_AIM)
+       if(cvar("g_balance_grenadelauncher_secondary_sticky") && other == world) // other.takedamage != DAMAGE_AIM)
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);