use different explosion sound for grenades

master
Lee Salzman 2012-12-29 21:29:51 +02:00
parent fdf248d81c
commit 540e6b8337
3 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@ registersound "aard/pain6"
registersound "aard/die1"
registersound "aard/die2"
registersound "q009/glauncher" // "awesund/flaunch"
registersound "awesund/explodemini"
registersound "q009/explosion"
registersound "free/splash1"
registersound "free/splash2"
registersound "aard/grunt1"

View File

@ -1126,7 +1126,7 @@ void particle_fireball(const vec &dest, float maxsize, int type, int fade, int c
{
if(!canaddparticles()) return;
float growth = maxsize - size;
if(fade < 0) fade = int(growth*25);
if(fade < 0) fade = int(growth*20);
newparticle(dest, vec(0, 0, 1), fade, type, color, size)->val = growth;
}

View File

@ -393,17 +393,17 @@ namespace game
void explode(bool local, fpsent *owner, const vec &v, dynent *safe, int damage, int gun)
{
particle_splash(PART_SPARK, 200, 300, v, 0xB49B4B, 0.24f);
playsound(S_RLHIT, &v);
particle_fireball(v, guns[gun].exprad, gun!=GUN_GL ? PART_EXPLOSION : PART_EXPLOSION_BLUE, -1, gun!=GUN_GL ? 0xFF8080 : 0x80FFFF, 4.0f);
playsound(gun!=GUN_GL ? S_RLHIT : S_FEXPLODE, &v);
particle_fireball(v, guns[gun].exprad, gun!=GUN_GL ? PART_EXPLOSION : PART_EXPLOSION_BLUE, gun!=GUN_GL ? -1 : int((guns[gun].exprad-4.0f)*15), gun!=GUN_GL ? 0xFF8080 : 0x80FFFF, 4.0f);
int numdebris = gun==GUN_BARREL ? rnd(max(maxbarreldebris-5, 1))+5 : rnd(maxdebris-5)+5;
vec debrisvel = owner->o==v ? vec(0, 0, 0) : vec(owner->o).sub(v).normalize(), debrisorigin(v);
if(gun==GUN_RL)
{
debrisorigin.add(vec(debrisvel).mul(8));
adddynlight(safe ? v : debrisorigin, 1.15f*guns[gun].exprad, vec(4, 3.0f, 2.0), 900, 100, 0, guns[gun].exprad/2, vec(2.0, 1.5f, 1.0f));
adddynlight(safe ? v : debrisorigin, 1.15f*guns[gun].exprad, vec(4, 3.0f, 2.0), 700, 100, 0, guns[gun].exprad/2, vec(2.0, 1.5f, 1.0f));
}
else if(gun==GUN_GL) adddynlight(v, 1.15f*guns[gun].exprad, vec(1.0f, 3.0f, 4.0), 900, 100, 0, 8, vec(0.5f, 2, 2));
else adddynlight(v, 1.15f*guns[gun].exprad, vec(2, 1.5f, 1), 900, 100);
else if(gun==GUN_GL) adddynlight(v, 1.15f*guns[gun].exprad, vec(1.0f, 3.0f, 4.0), 600, 100, 0, 8, vec(0.5f, 2, 2));
else adddynlight(v, 1.15f*guns[gun].exprad, vec(2, 1.5f, 1), 700, 100);
if(numdebris)
{
loopi(numdebris)