From 2cb6c43a65cb5d5437275eeb01bdbcf84c90461b Mon Sep 17 00:00:00 2001 From: Stephen Thiebaud Date: Thu, 4 Dec 2025 19:56:11 -0600 Subject: [PATCH] fix: don't attempt to play sound in setdefaults when on the game menu It would be better to put this into OnSpawn or something later anyway..? --- Projectiles/Boss/OverlyDramaticDukeSummoner.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs index a7be93ef6e..923043b8d3 100644 --- a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs +++ b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Boss { Vector2 cen; - public SlotId SoundId; + public SlotId SoundId = SlotId.Invalid; public new string LocalizationCategory => "Projectiles.Boss"; public override string Texture => "CalamityMod/Projectiles/Boss/OldDukeVortex"; @@ -35,7 +35,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - SoundId = SoundEngine.PlaySound(OldDukeVortex.SpawnSound with { IsLooped = true, MaxInstances = 20 }, Projectile.Center, _ => new ProjectileAudioTracker(Projectile).IsActiveAndInGame()); + if (!Main.gameMenu) + SoundId = SoundEngine.PlaySound(OldDukeVortex.SpawnSound with { IsLooped = true, MaxInstances = 20 }, Projectile.Center, _ => new ProjectileAudioTracker(Projectile).IsActiveAndInGame()); + Projectile.width = Projectile.height = 408; Projectile.scale = 0.004f; Projectile.hostile = true;