Skip to content

Commit 22fee7b

Browse files
authored
fix 2633: Do not send entity packet unless sprite actually changes (#2784)
* Do not send entity packet unless sprite actually changes * Update CommandProcessing.cs
1 parent c8a1a08 commit 22fee7b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Intersect.Server.Core/Entities/Events/CommandProcessing.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,11 @@ private static void ProcessCommand(
640640
Stack<CommandInstance> callStack
641641
)
642642
{
643-
player.Sprite = command.Sprite;
644-
PacketSender.SendEntityDataToProximity(player);
643+
if (!string.Equals(player.Sprite, command.Sprite, StringComparison.OrdinalIgnoreCase))
644+
{
645+
player.Sprite = command.Sprite;
646+
PacketSender.SendEntityDataToProximity(player);
647+
}
645648
}
646649

647650
//Change Face Command

0 commit comments

Comments
 (0)