]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix stickiness
authorRudolf Polzer <divverent@alientrap.org>
Fri, 3 Sep 2010 20:57:34 +0000 (22:57 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 3 Sep 2010 20:57:34 +0000 (22:57 +0200)
qcsrc/server/w_grenadelauncher.qc

index 33a6ca5aa3b3deadedd8a21f0aee51df2c6fcff3..563496170e431d7e008bac0324e1b2eec7e4bf82 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 && other.movetype == MOVETYPE_NONE)
+       if(cvar("g_balance_grenadelauncher_primary_sticky") && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)))
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
 
@@ -78,7 +78,8 @@ void W_Grenade_Touch1 (void)
 void W_Grenade_Touch2 (void)
 {
        PROJECTILE_TOUCH;
-       if(cvar("g_balance_grenadelauncher_secondary_sticky") && other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)
+       print(sprintf("%e takedamage=%d movetype=%d\n", other, other.takedamage, other.movetype));
+       if(cvar("g_balance_grenadelauncher_secondary_sticky") && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)))
        {
                spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);