diff --git a/source/src/protos.h b/source/src/protos.h index d56bef27..702b133b 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -377,7 +377,7 @@ extern void particle_splash(int type, int num, int fade, vec &p); extern void particle_trail(int type, int fade, vec &from, vec &to); extern void particle_fireball(int type, vec &o); extern void addshotline(dynent *d, vec &from, vec &to); -extern bool addbullethole(vec &from, vec &to, float radius = 1); +extern bool addbullethole(vec &from, vec &to, float radius = 1, bool noisy = true); extern bool addscorchmark(vec &o, float radius = 7); extern void render_particles(int time); diff --git a/source/src/renderparticles.cpp b/source/src/renderparticles.cpp index 7bd4d47d..b12eb5fb 100644 --- a/source/src/renderparticles.cpp +++ b/source/src/renderparticles.cpp @@ -530,7 +530,7 @@ void particle_fireball(int type, vec &o) VARP(bulletholettl, 0, 10000, 30000); VARP(bulletbouncesound, 0, 1, 1); -bool addbullethole(vec &from, vec &to, float radius) +bool addbullethole(vec &from, vec &to, float radius, bool noisy) { if(!bulletholettl) return false; vec surface, ray(to); @@ -542,7 +542,7 @@ bool addbullethole(vec &from, vec &to, float radius) o.add(ray.mul(dist)); o.add(vec(surface).mul(0.005f)); newparticle(o, surface, bulletholettl, 7); - if(bulletbouncesound) playsound(S_BULLETBOUNCE, NULL, NULL, &o); + if(noisy && bulletbouncesound) playsound(S_BULLETBOUNCE, NULL, NULL, &o); return true; } diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 21642fef..8e294116 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -882,7 +882,7 @@ struct shotgun : gun if(addbullethole(from, to)) { int holes = 3+rnd(5); - loopi(holes) addbullethole(from, sg[i], 0); + loopi(holes) addbullethole(from, sg[i], 0, false); } attacksound(); }