diff --git a/core/assets/sounds/laserblast.ogg b/core/assets/sounds/laserblast.ogg index a23146a436..6df3b14284 100644 Binary files a/core/assets/sounds/laserblast.ogg and b/core/assets/sounds/laserblast.ogg differ diff --git a/core/assets/sounds/lasercharge.ogg b/core/assets/sounds/lasercharge.ogg new file mode 100644 index 0000000000..7e50df3661 Binary files /dev/null and b/core/assets/sounds/lasercharge.ogg differ diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 68d6a12ada..6a830d6ef9 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -491,6 +491,9 @@ public class UnitTypes implements ContentList{ drawShields = false; weapons.add(new Weapon("corvus-weapon"){{ + shootSound = Sounds.laserblast; + chargeSound = Sounds.lasercharge; + soundPitchMin = 1f; top = false; mirror = false; shake = 14f; @@ -498,7 +501,6 @@ public class UnitTypes implements ContentList{ x = y = 0; reload = 350f; recoil = 0f; - shootSound = Sounds.laser; cooldownTime = 350f; diff --git a/core/src/mindustry/entities/comp/WeaponsComp.java b/core/src/mindustry/entities/comp/WeaponsComp.java index 00fc925a5e..d9488084b0 100644 --- a/core/src/mindustry/entities/comp/WeaponsComp.java +++ b/core/src/mindustry/entities/comp/WeaponsComp.java @@ -168,7 +168,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ float baseX = this.x, baseY = this.y; boolean delay = weapon.firstShotDelay + weapon.shotDelay > 0f; - (delay ? weapon.chargeSound : weapon.shootSound).at(x, y, Mathf.random(0.8f, 1.0f)); + (delay ? weapon.chargeSound : weapon.shootSound).at(x, y, Mathf.random(weapon.soundPitchMin, weapon.soundPitchMax)); BulletType ammo = weapon.bullet; float lifeScl = ammo.scaleVelocity ? Mathf.clamp(Mathf.dst(x, y, aimX, aimY) / ammo.range()) : 1f; @@ -195,7 +195,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil)); Effect.shake(weapon.shake, weapon.shake, x, y); mount.heat = 1f; - weapon.shootSound.at(x, y, Mathf.random(0.8f, 1.0f)); + weapon.shootSound.at(x, y, Mathf.random(weapon.soundPitchMin, weapon.soundPitchMax)); }); }else{ vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil)); diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index d2b5a3bb8e..6d7434e51b 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -62,6 +62,8 @@ public class Weapon{ public float shootCone = 5f; /** ticks to cool down the heat region */ public float cooldownTime = 20f; + /** random sound pitch range */ + public float soundPitchMin = 0.8f, soundPitchMax = 1f; /** whether shooter rotation is ignored when shooting. */ public boolean ignoreRotation = false; /** min velocity required for this weapon to shoot */