attempted to fix the Yharon desyncs in multiplayer by adding a couple extra net updates
This commit is contained in:
1 parent
5f18ef5110
commit
805041cdb9
1 file changed
+4
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user