]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/samual/grenadelauncher_lifetime_bounce'
authorRudolf Polzer <divverent@xonotic.org>
Fri, 8 Jul 2011 22:28:17 +0000 (00:28 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 8 Jul 2011 22:28:17 +0000 (00:28 +0200)
1  2 
qcsrc/server/w_grenadelauncher.qc

index 15452ed78271c5738b0068f491db3b3a9ca0a553,f7e789228adace6071dd9c7571856fd45e045194..1d2ee93b9a2cfb8778d290f69f5071b0491b55ed
@@@ -126,19 -126,23 +126,23 @@@ void W_Grenade_Touch2 (void
                float r;
                r = random() * 6;
                if(r < 1)
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
 +                      spamsound (self, CH_SHOTS, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
                else if(r < 2)
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
 +                      spamsound (self, CH_SHOTS, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
                else if(r < 3)
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
 +                      spamsound (self, CH_SHOTS, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
                else if(r < 4)
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
 +                      spamsound (self, CH_SHOTS, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
                else if(r < 5)
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
 +                      spamsound (self, CH_SHOTS, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
                else
 -                      spamsound (self, CHAN_PROJECTILE, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
 +                      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
        {