W_Grenade_Explode();
}
+void W_Grenade_Think2 (void)
+{
+ self.nextthink = time;
+ if (time > self.cnt)
+ {
+ other = world;
+ self.projectiledeathtype |= HITTYPE_BOUNCE;
+ W_Grenade_Explode2 ();
+ return;
+ }
+}
+
void W_Grenade_Touch1 (void)
{
PROJECTILE_TOUCH;
// 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);
}
}
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.cnt = 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
{
// 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);
}
}
setorigin(gren, w_shotorg);
setsize(gren, '-3 -3 -3', '3 3 3');
- gren.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime;
- gren.think = adaptor_think2use_hittype_splash;
+ gren.cnt = time + autocvar_g_balance_grenadelauncher_secondary_lifetime;
+ gren.nextthink = time;
+ gren.think = W_Grenade_Think2;
gren.use = W_Grenade_Explode2;
gren.touch = W_Grenade_Touch2;
}
}
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))
{
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)
{