diff --git a/core/assets/sounds/artillery.ogg b/core/assets/sounds/artillery.ogg index d9f8b74d75..f05e22341a 100644 Binary files a/core/assets/sounds/artillery.ogg and b/core/assets/sounds/artillery.ogg differ diff --git a/core/assets/sounds/artillerySmall.ogg b/core/assets/sounds/artillerySmall.ogg new file mode 100644 index 0000000000..b85fac740c Binary files /dev/null and b/core/assets/sounds/artillerySmall.ogg differ diff --git a/core/assets/sounds/bang.ogg b/core/assets/sounds/bang.ogg index 29cde62552..7d52c9208b 100644 Binary files a/core/assets/sounds/bang.ogg and b/core/assets/sounds/bang.ogg differ diff --git a/core/assets/sounds/explosion.ogg b/core/assets/sounds/explosion.ogg index 5f4a69281d..72c11890a9 100644 Binary files a/core/assets/sounds/explosion.ogg and b/core/assets/sounds/explosion.ogg differ diff --git a/core/assets/sounds/laser.ogg b/core/assets/sounds/laser.ogg index 3a727c5053..dce9cf5d3c 100644 Binary files a/core/assets/sounds/laser.ogg and b/core/assets/sounds/laser.ogg differ diff --git a/core/assets/sounds/laser2.ogg b/core/assets/sounds/laser2.ogg new file mode 100644 index 0000000000..88c9a1e185 Binary files /dev/null and b/core/assets/sounds/laser2.ogg differ diff --git a/core/assets/sounds/lasercharge3.ogg b/core/assets/sounds/lasercharge3.ogg new file mode 100644 index 0000000000..50ff067f8b Binary files /dev/null and b/core/assets/sounds/lasercharge3.ogg differ diff --git a/core/assets/sounds/missile.ogg b/core/assets/sounds/missile.ogg index 4e94b6a34e..be57a5d7e0 100644 Binary files a/core/assets/sounds/missile.ogg and b/core/assets/sounds/missile.ogg differ diff --git a/core/assets/sounds/missileLong.ogg b/core/assets/sounds/missileLong.ogg new file mode 100644 index 0000000000..50bcbb0aed Binary files /dev/null and b/core/assets/sounds/missileLong.ogg differ diff --git a/core/assets/sounds/missileShort.ogg b/core/assets/sounds/missileShort.ogg new file mode 100644 index 0000000000..befd43d49d Binary files /dev/null and b/core/assets/sounds/missileShort.ogg differ diff --git a/core/assets/sounds/railgun.ogg b/core/assets/sounds/railgun.ogg index 26cb8f6da4..bc279cfec3 100644 Binary files a/core/assets/sounds/railgun.ogg and b/core/assets/sounds/railgun.ogg differ diff --git a/core/assets/sounds/reactorExplosion.ogg b/core/assets/sounds/reactorExplosion.ogg index 9e15fe2221..d933140a38 100644 Binary files a/core/assets/sounds/reactorExplosion.ogg and b/core/assets/sounds/reactorExplosion.ogg differ diff --git a/core/assets/sounds/shootCyclone.ogg b/core/assets/sounds/shootCyclone.ogg index fb38094a23..1d497dfc73 100644 Binary files a/core/assets/sounds/shootCyclone.ogg and b/core/assets/sounds/shootCyclone.ogg differ diff --git a/core/assets/sounds/shootRipple.ogg b/core/assets/sounds/shootRipple.ogg index c1fbe9c634..fba422e572 100644 Binary files a/core/assets/sounds/shootRipple.ogg and b/core/assets/sounds/shootRipple.ogg differ diff --git a/core/assets/sounds/shootScepter.ogg b/core/assets/sounds/shootScepter.ogg new file mode 100644 index 0000000000..3a0690b6ad Binary files /dev/null and b/core/assets/sounds/shootScepter.ogg differ diff --git a/core/assets/sounds/shootSnap.ogg b/core/assets/sounds/shootSnap.ogg index 17826bb5c0..1af7562610 100644 Binary files a/core/assets/sounds/shootSnap.ogg and b/core/assets/sounds/shootSnap.ogg differ diff --git a/core/assets/sounds/shootStell.ogg b/core/assets/sounds/shootStell.ogg index 328d4d9449..f65d486037 100644 Binary files a/core/assets/sounds/shootStell.ogg and b/core/assets/sounds/shootStell.ogg differ diff --git a/core/assets/sounds/sparkBullet.ogg b/core/assets/sounds/sparkBullet.ogg new file mode 100644 index 0000000000..025799eebe Binary files /dev/null and b/core/assets/sounds/sparkBullet.ogg differ diff --git a/core/src/mindustry/audio/SoundPriority.java b/core/src/mindustry/audio/SoundPriority.java index 0d1890740b..6f24cde2f3 100644 --- a/core/src/mindustry/audio/SoundPriority.java +++ b/core/src/mindustry/audio/SoundPriority.java @@ -3,11 +3,13 @@ package mindustry.audio; import arc.*; import arc.audio.*; import arc.struct.*; +import mindustry.gen.*; import static mindustry.gen.Sounds.*; /** Sets up priorities and groups for various sounds. */ public class SoundPriority{ + static int lastGroup = 1; public static void init(){ //priority 2: long weapon loops @@ -35,6 +37,7 @@ public class SoundPriority{ respawning ); + sameGroup(Sounds.missile, Sounds.missileShort); for(var sound : Core.assets.getAll(Sound.class, new Seq<>())){ sound.setMinConcurrentInterrupt(Math.min(0.25f, sound.getLength() * 0.5f)); @@ -44,6 +47,11 @@ public class SoundPriority{ mechStep.setMaxConcurrent(3); } + static void sameGroup(Sound... sounds){ + int id = lastGroup ++; + for(var s : sounds) s.setConcurrentGroup(id); + } + static void set(float value, Sound... sounds){ for(var s : sounds) s.setPriority(value); } diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 19f5c734ff..be4dc39447 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3494,7 +3494,7 @@ public class Blocks{ inaccuracy = 1f; shootCone = 10f; health = 260; - shootSound = Sounds.bang; + shootSound = Sounds.artillerySmall; coolant = consumeCoolant(0.1f); limitRange(0f); }}; @@ -3531,7 +3531,6 @@ public class Blocks{ flags = EnumSet.of(BlockFlag.turret, BlockFlag.extinguisher); }}; - //TODO these may work in space, but what's the point? lancer = new PowerTurret("lancer"){{ requirements(Category.turret, with(Items.copper, 60, Items.lead, 70, Items.silicon, 60, Items.titanium, 30)); range = 165f; @@ -3551,6 +3550,7 @@ public class Blocks{ accurateDelay = false; shootSound = Sounds.laser; coolant = consumeCoolant(0.2f); + chargeSound = Sounds.lasercharge3; consumePower(6f); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index f3897535cf..865c0248e8 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -219,7 +219,7 @@ public class UnitTypes{ recoil = 5f; shake = 2f; ejectEffect = Fx.casing3; - shootSound = Sounds.bang; + shootSound = Sounds.shootScepter; inaccuracy = 3f; shoot.shots = 3; @@ -235,6 +235,7 @@ public class UnitTypes{ lightningColor = Pal.surge; //standard bullet damage is far too much for lightning lightningDamage = 20; + despawnSound = Sounds.sparkBullet; }}; }}, @@ -245,6 +246,7 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootDagger; }}, new Weapon("mount-weapon"){{ reload = 16f; @@ -253,6 +255,7 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootDagger; }} ); }}; @@ -299,6 +302,7 @@ public class UnitTypes{ fragBullets = 3; fragLifeMin = 0f; fragRandomSpread = 30f; + despawnSound = Sounds.explosion; fragBullet = new BasicBulletType(9f, 20){{ width = 10f; @@ -1080,7 +1084,7 @@ public class UnitTypes{ shoot.shots = 2; inaccuracy = 5f; velocityRnd = 0.2f; - shootSound = Sounds.missile; + shootSound = Sounds.missileLong; bullet = new MissileBulletType(3f, 14){{ width = 8f; @@ -1165,7 +1169,7 @@ public class UnitTypes{ shake = 1f; rotateSpeed = 2f; ejectEffect = Fx.casing1; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSpectre; rotate = true; shadow = 8f; bullet = new BasicBulletType(7f, 55){{ @@ -1214,7 +1218,7 @@ public class UnitTypes{ rotateSpeed = 2f; reload = 45f; recoil = 4f; - shootSound = Sounds.laser; + shootSound = Sounds.laser2; shadow = 20f; rotate = true; @@ -1234,7 +1238,7 @@ public class UnitTypes{ y = 27f; rotateSpeed = 2f; reload = 9f; - shootSound = Sounds.shoot; + shootSound = Sounds.shootCyclone; shadow = 7f; rotate = true; recoil = 0.5f; @@ -1248,7 +1252,7 @@ public class UnitTypes{ ejectEffect = Fx.casing1; rotateSpeed = 7f; shake = 1f; - shootSound = Sounds.shoot; + shootSound = Sounds.shootCyclone; rotate = true; shadow = 12f; shootY = 7.25f; @@ -1307,7 +1311,7 @@ public class UnitTypes{ reload = 30f; ejectEffect = Fx.none; recoil = 2f; - shootSound = Sounds.missile; + shootSound = Sounds.missileShort; velocityRnd = 0.5f; inaccuracy = 15f; alternate = true; @@ -1504,6 +1508,7 @@ public class UnitTypes{ y = 1.5f; rotate = true; ejectEffect = Fx.casing1; + shootSound = Sounds.shootDagger; bullet = new BasicBulletType(2.5f, 9){{ width = 7f; height = 9f; @@ -1519,7 +1524,7 @@ public class UnitTypes{ y = -5f; rotate = true; ejectEffect = Fx.casing1; - shootSound = Sounds.missile; + shootSound = Sounds.missileShort; bullet = new MissileBulletType(2.7f, 12, "missile"){{ keepVelocity = true; width = 8f; @@ -1565,7 +1570,7 @@ public class UnitTypes{ rotateSpeed = 5f; inaccuracy = 8f; ejectEffect = Fx.casing1; - shootSound = Sounds.shoot; + shootSound = Sounds.shootDuo; bullet = new FlakBulletType(4.2f, 3){{ lifetime = 60f; ammoMultiplier = 4f; @@ -1587,7 +1592,7 @@ public class UnitTypes{ rotateSpeed = 2f; shake = 1.5f; ejectEffect = Fx.casing2; - shootSound = Sounds.bang; + shootSound = Sounds.artillerySmall; bullet = new ArtilleryBulletType(3f, 20, "shell"){{ hitEffect = Fx.flakExplosion; knockback = 0.8f; @@ -1671,7 +1676,7 @@ public class UnitTypes{ inaccuracy = 5f; velocityRnd = 0.1f; - shootSound = Sounds.missile; + shootSound = Sounds.missileShort; ammoType = new ItemAmmoType(Items.thorium); ejectEffect = Fx.none; @@ -1730,7 +1735,7 @@ public class UnitTypes{ inaccuracy = 7f; ejectEffect = Fx.none; shake = 1f; - shootSound = Sounds.missile; + shootSound = Sounds.missileLong; shoot = new ShootAlternate(){{ shots = 6; @@ -1772,7 +1777,7 @@ public class UnitTypes{ recoil = 3f; shadow = 12f; ejectEffect = Fx.casing3; - shootSound = Sounds.shootBig; + shootSound = Sounds.shootSpectre; shoot.shots = 3; shoot.shotDelay = 4f; diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index a3ce2be56b..d32d407937 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -609,7 +609,7 @@ public class BulletType extends Content implements Cloneable{ } despawnEffect.at(b.x, b.y, b.rotation(), hitColor); - despawnSound.at(b); + despawnSound.at(b, 1f + Mathf.range(hitSoundPitchRange)); Effect.shake(despawnShake, despawnShake, b); } diff --git a/core/src/mindustry/graphics/FloorRenderer.java b/core/src/mindustry/graphics/FloorRenderer.java index ebc7c5c623..33d36083a6 100644 --- a/core/src/mindustry/graphics/FloorRenderer.java +++ b/core/src/mindustry/graphics/FloorRenderer.java @@ -437,6 +437,13 @@ public class FloorRenderer{ int idx = vidx; vidx += spriteSize; + //fixes graphical artifacting due to low precision positions/UVs. TODO: test for issues + final float grow = 0.01f; + x -= grow; + y -= grow; + width += grow*2f; + height += grow*2f; + if(!Mathf.zero(rotation)){ //bottom left and top right corner points relative to origin float worldOriginX = x + originX; diff --git a/core/src/mindustry/type/Planet.java b/core/src/mindustry/type/Planet.java index fe582e484f..0a314342ce 100644 --- a/core/src/mindustry/type/Planet.java +++ b/core/src/mindustry/type/Planet.java @@ -629,7 +629,9 @@ public class Planet extends UnlockableContent{ batch.color(Tmp.c1); batch.vertex(Tmp.bz3.valueAt(Tmp.v32, f).add(normal, -stroke)); } + Gl.disable(Gl.cullFace); batch.flush(Gl.triangleStrip); + Gl.enable(Gl.cullFace); } public Vec3 lookAt(Sector sector, Vec3 out){