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
This commit is contained in:
1 parent
a20204d47f
commit
830aaad2a2
1 file changed
+8
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user