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

Commit d024a30

Browse files
No longer send player position from client
1 parent 311c7fd commit d024a30

3 files changed

Lines changed: 0 additions & 49 deletions

File tree

Scripts/Netcode/Common/CPacketPlayerPosition.cs

Lines changed: 0 additions & 33 deletions
This file was deleted.

Scripts/Netcode/Common/_Opcodes.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public enum ClientPacketOpcode
1111
LobbyGameStart,
1212
PlayerDirectionPressed,
1313
PlayerDirectionReleased,
14-
PlayerPosition,
1514
ProcessDelta
1615
}
1716

Scripts/Scenes/Game/ClientPlayer.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ namespace Game
1111
public class ClientPlayer : OtherPlayer
1212
{
1313
private float Speed = 250f;
14-
15-
private Timer TimerNotifyServerClientPosition { get; set; }
1614
private Timer TimerNotifyServerProcessDelta { get; set; }
1715
private float Delta { get; set; }
1816

@@ -23,11 +21,6 @@ public override void _Ready()
2321

2422
if (GameClient.Running)
2523
{
26-
TimerNotifyServerClientPosition = new Timer(2000);
27-
TimerNotifyServerClientPosition.Elapsed += TimerNotifyServerClientPositionCallback;
28-
TimerNotifyServerClientPosition.AutoReset = true;
29-
TimerNotifyServerClientPosition.Enabled = true;
30-
3124
if (GameClient.IsHost)
3225
{
3326
TimerNotifyServerProcessDelta = new Timer(3000);
@@ -38,14 +31,6 @@ public override void _Ready()
3831
}
3932
}
4033

41-
public async void TimerNotifyServerClientPositionCallback(System.Object source, ElapsedEventArgs args)
42-
{
43-
await GameClient.Send(ClientPacketOpcode.PlayerPosition, new CPacketPlayerPosition
44-
{
45-
Position = Position
46-
});
47-
}
48-
4934
public async void TimerNotifyServerProcessDeltaCallback(System.Object source, ElapsedEventArgs args)
5035
{
5136
await GameClient.Send(ClientPacketOpcode.ProcessDelta, new CPacketProcessDelta

0 commit comments

Comments
 (0)