Skip to content

Commit 52d7e18

Browse files
committed
change delay before updating position
1 parent 791a1b6 commit 52d7e18

File tree

1 file changed

+7
-1
lines changed
  • TaleKit/Network/Packet/Characters

1 file changed

+7
-1
lines changed

TaleKit/Network/Packet/Characters/Walk.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ public class WalkProcessor : PacketProcessor<Walk>
3131
{
3232
protected override void Process(Session session, Walk packet)
3333
{
34-
Task.Delay(1000).Then(() =>
34+
var distance = session.Character.Position.GetDistance(new Position
35+
{
36+
X = packet.X,
37+
Y = packet.Y
38+
});
39+
40+
Task.Delay(distance * 200).Then(() =>
3541
{
3642
session.Character.Position = new Position
3743
{

0 commit comments

Comments
 (0)