]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_grenadelauncher.qc
Merge remote branch 'origin/master' into fruitiex/animations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_grenadelauncher.qc
index 0e03c953c077eb427dd8bd54d5ec6a0763afedc6..1d2ee93b9a2cfb8778d290f69f5071b0491b55ed 100644 (file)
@@ -110,7 +110,7 @@ void W_Grenade_Touch1 (void)
                // do not respond to any more touches
                self.solid = SOLID_NOT;
 
-               self.nextthink = min(self.nextthink, time + autocvar_g_balance_grenadelauncher_primary_lifetime2);
+               self.nextthink = min(self.nextthink, time + autocvar_g_balance_grenadelauncher_primary_lifetime_stick);
        }
 }
 
@@ -139,6 +139,10 @@ void W_Grenade_Touch2 (void)
                        spamsound (self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
+               
+               if (autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce && self.gl_bouncecnt == 1)
+                       self.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce;
+                       
        }
        else if(autocvar_g_balance_grenadelauncher_secondary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick
        {
@@ -154,7 +158,7 @@ void W_Grenade_Touch2 (void)
                // do not respond to any more touches
                self.solid = SOLID_NOT;
 
-               self.nextthink = min(self.nextthink, time + autocvar_g_balance_grenadelauncher_secondary_lifetime2);
+               self.nextthink = min(self.nextthink, time + autocvar_g_balance_grenadelauncher_secondary_lifetime_stick);
        }
 }
 
@@ -310,7 +314,7 @@ float w_glauncher(float req)
                                        }
                                }
                                if(nadefound)
-                                       asound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
+                                       sound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
                        else if (weapon_prepareattack(1, autocvar_g_balance_grenadelauncher_secondary_refire))
                        {
@@ -367,7 +371,7 @@ float w_glauncher(float req)
                org2 = w_org + w_backoff * 12;
                pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {