From 20e1eddaf0d22536017eef6138f65bf528bc4b86 Mon Sep 17 00:00:00 2001 From: Big E Date: Sun, 25 Jan 2026 23:52:28 -0500 Subject: [PATCH] + Proper Netmode checks for Perforator Hive worm spawning --- NPCs/Perforator/PerforatorHive.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index b5bedb3078..4699dddf4c 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.Perforator } - if (Main.getGoodWorld && lifeRatio < 0.5f) + if (Main.getGoodWorld && lifeRatio < 0.5f && Main.netMode != NetmodeID.MultiplayerClient) { if (lifeRatio > 0.35f) NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); @@ -346,13 +346,16 @@ namespace CalamityMod.NPCs.Perforator { squashTimer = squashInterval; // Start scaling animation - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); - - // Spawn two small worms in Death - if (death) + if (Main.netMode != NetmodeID.MultiplayerClient) { - if (wormType == ModContent.NPCType()) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + + // Spawn two small worms in Death + if (death) + { + if (wormType == ModContent.NPCType()) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), wormType, 1); + } } }