From 805041cdb9efd4355fb7c0bdb357c5dddef7645f Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Fri, 12 Apr 2024 20:17:16 -0600 Subject: [PATCH] attempted to fix the Yharon desyncs in multiplayer by adding a couple extra net updates --- NPCs/Yharon/Yharon.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 57d82c93ca..7387859b80 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -1691,7 +1691,10 @@ namespace CalamityMod.NPCs.Yharon // Despawn safety, make sure to target another player if the current player target is too far away if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + { NPC.TargetClosest(); + NPC.netUpdate = true; + } Player targetData = Main.player[NPC.target]; @@ -1700,6 +1703,7 @@ namespace CalamityMod.NPCs.Yharon if (targetData.dead || !targetData.active) { NPC.TargetClosest(); + NPC.netUpdate = true; targetData = Main.player[NPC.target]; if (targetData.dead || !targetData.active) {