diff --git a/.gitignore b/.gitignore index f672486..3c7d9a9 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,5 @@ Thumbs.db android/libs/ ## Debuging Jar Mindustry.jar +## Personal Debuging Script +debug.bat diff --git a/src/bluearchive/units/UnitSound.java b/src/bluearchive/units/UnitSound.java index 969c071..b6c7b22 100644 --- a/src/bluearchive/units/UnitSound.java +++ b/src/bluearchive/units/UnitSound.java @@ -28,7 +28,7 @@ public static void init() { if (e.unit != null) { /* pass if the e.unit is specified */ if (e.unit.type == Vars.content.unit("collaris")) { - pickedSound.stop(); + if(pickedSound != null) pickedSound.stop(); arrivalSound = Seq.with(new Sound(Vars.tree.get("sounds/units/collaris-arrival1.ogg")), new Sound(Vars.tree.get("sounds/units/collaris-arrival2.ogg"))); arrivalAssignedSound = arrivalSound.random(); arrivalAssignedSound.play(); @@ -40,7 +40,7 @@ public static void init() { if (e.unit != null) { /* pass if the e.unit is specified */ if (e.unit.type == Vars.content.unit("collaris")) { - arrivalAssignedSound.stop(); + if(arrivalAssignedSound != null) arrivalAssignedSound.stop(); pickedSound.play(); } }