From 830aaad2a2e8ee0ad99282bb0f245efaf8d47cba Mon Sep 17 00:00:00 2001 From: Habble53 <87115317+Habble53@users.noreply.github.com> Date: Sat, 11 Jul 2026 08:51:12 +0300 Subject: [PATCH 1/2] Fixed Anahita being permanently marked as wet NewNPC sets wet after SetDefaults based ONLY on the position and NPCs with noTileCollide=true don't update wet collision, that means mechanics like Bat Scepter homing will ignore Anahita as they would normally despawn underwater by targetting a wet NPC --- NPCs/Leviathan/Anahita.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index 5069afc176..e4c592443c 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -10,6 +10,7 @@ using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.ID; @@ -117,6 +118,7 @@ namespace CalamityMod.NPCs.Leviathan writer.Write(NPC.Calamity().newAI[0]); writer.Write(HasBegunSummoningLeviathan); writer.Write(DrawProjectileTelegraphTimer); + writer.Write(NPC.wet); } public override void ReceiveExtraAI(BinaryReader reader) @@ -132,6 +134,12 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().newAI[0] = reader.ReadSingle(); HasBegunSummoningLeviathan = reader.ReadBoolean(); DrawProjectileTelegraphTimer = reader.ReadInt32(); + NPC.wet = reader.ReadBoolean(); + } + + public override void OnSpawn(IEntitySource source) + { + NPC.wet = false; } public override void AI() From 8dd9696727c729f4b1d85c3719310a94ecabac43 Mon Sep 17 00:00:00 2001 From: Habble53 <87115317+Habble53@users.noreply.github.com> Date: Sat, 11 Jul 2026 09:28:57 +0300 Subject: [PATCH 2/2] Included explanation --- NPCs/Leviathan/Anahita.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index e4c592443c..48597bbc6d 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -139,6 +139,7 @@ namespace CalamityMod.NPCs.Leviathan public override void OnSpawn(IEntitySource source) { + // Fix weird case where NewNPC sets NPC.wet based on position regardless of noTileCollide NPC.wet = false; }