From fea07707aa7ca89706dbe51d1c8558b0a43ffad0 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Fri, 18 Apr 2025 00:14:11 -0500 Subject: [PATCH] Another Deus fix. --- NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs | 9 ++++++++- Projectiles/Boss/DeusRitualDrama.cs | 8 +------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs index 4ae6fd1ae2..c7144fd7be 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs @@ -864,8 +864,15 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs } } + // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer + if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) + { + SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, npc.Center); + calamityGlobalNPC.newAI[1] = 1f; + } + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing - if (calamityGlobalNPC.newAI[1] < resistanceTime && ((npc.position - npc.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 0f)) + if (calamityGlobalNPC.newAI[1] < resistanceTime && ((npc.position - npc.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) calamityGlobalNPC.newAI[1] += 1f; // Calculate contact damage based on velocity diff --git a/Projectiles/Boss/DeusRitualDrama.cs b/Projectiles/Boss/DeusRitualDrama.cs index 41781699c0..b432ef06c5 100644 --- a/Projectiles/Boss/DeusRitualDrama.cs +++ b/Projectiles/Boss/DeusRitualDrama.cs @@ -46,13 +46,7 @@ namespace CalamityMod.Projectiles.Boss { int idx = NPC.NewNPC(Projectile.GetSource_FromThis(), (int)Projectile.Center.X, (int)Projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); if (idx != -1) - { - SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, Projectile.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - CalamityUtils.BossAwakenMessage(idx); - else - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); - } + CalamityUtils.BossAwakenMessage(idx); } } }