]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_grenadelauncher.qc
Merge remote branch 'refs/remotes/origin/fruitiex/fruitbalance'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_grenadelauncher.qc
index 33a6ca5aa3b3deadedd8a21f0aee51df2c6fcff3..84b98b525cd3bec1be709072ffc73478cf8f951d 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,7 @@ 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)
+       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);
 
@@ -165,7 +165,7 @@ void W_Grenade_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
-       W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);