Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit 3ce47f1

Browse files
Fix position not getting set server-side
1 parent bfc49d6 commit 3ce47f1

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Scripts/Netcode/Common/CPacketPlayerPosition.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,12 @@ public override void Read(PacketReader reader)
2020
var pos = new Vector2();
2121
pos.x = reader.ReadFloat();
2222
pos.y = reader.ReadFloat();
23+
Position = pos;
2324
}
2425

2526
public override void Handle(ENet.Peer peer)
2627
{
2728
GameServer.Players[peer.ID].Position = Position;
28-
29-
/*foreach (var pair in GameServer.Players)
30-
{
31-
GameServer.Send(ServerPacketOpcode.PlayerPositions, new SPacketPlayerPositions {
32-
PlayerPositions = GameServer.Players.Where(x => x.Key != pair.Key).ToDictionary(x => x.Key, x => x.Value.Position)
33-
}, GameServer.Peers[pair.Key]);
34-
}*/
3529
}
3630
}
3731
}

0 commit comments

Comments
 (0)