From 956f4659c7ee54f8915370428e1069f2518cfe1f Mon Sep 17 00:00:00 2001 From: MEEP of Faith <54301439+MEEPofFaith@users.noreply.github.com> Date: Fri, 15 Jan 2021 07:13:41 -0800 Subject: [PATCH] Sound stuff (#4332) --- core/src/mindustry/entities/bullet/BulletType.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 53aad2f052..318fbd6f04 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -34,6 +34,10 @@ public abstract class BulletType extends Content{ public Effect smokeEffect = Fx.shootSmallSmoke; /** Sound made when hitting something or getting removed.*/ public Sound hitSound = Sounds.none; + /** Pitch of the sound made when hitting something*/ + public float hitSoundPitch = 1; + /** Volume of the sound made when hitting something*/ + public float hitSoundVolume = 1; /** Extra inaccuracy when firing. */ public float inaccuracy = 0f; /** How many bullets get created per ammo item/liquid. */ @@ -186,7 +190,7 @@ public abstract class BulletType extends Content{ public void hit(Bullet b, float x, float y){ hitEffect.at(x, y, b.rotation(), hitColor); - hitSound.at(b); + hitSound.at(x, y, hitSoundPitch, hitSoundVolume); Effect.shake(hitShake, hitShake, b);