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

Commit ba29e84

Browse files
add packet flag params to Client/ServerPacket.cs
1 parent 015f46f commit ba29e84

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Scripts/Netcode/Common/Core/ClientPacket.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
using ENet;
2+
13
namespace GodotModules.Netcode
24
{
35
public class ClientPacket : GamePacket
46
{
5-
public ClientPacket(byte opcode, APacket writable = null)
7+
public ClientPacket(byte opcode, PacketFlags flags, APacket writable = null)
68
{
79
using (var writer = new PacketWriter())
810
{
@@ -14,6 +16,7 @@ public ClientPacket(byte opcode, APacket writable = null)
1416
Size = stream.Length;
1517
}
1618

19+
PacketFlags = flags;
1720
Opcode = opcode;
1821
}
1922
}

Scripts/Netcode/Common/Core/ServerPacket.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class ServerPacket : GamePacket
66
{
77
public Peer[] Peers { get; private set; }
88

9-
public ServerPacket(byte opcode, APacket writable = null, params Peer[] peers)
9+
public ServerPacket(byte opcode, PacketFlags packetFlags, APacket writable = null, params Peer[] peers)
1010
{
1111
using (var writer = new PacketWriter())
1212
{
@@ -19,6 +19,7 @@ public ServerPacket(byte opcode, APacket writable = null, params Peer[] peers)
1919
}
2020

2121
Opcode = opcode;
22+
PacketFlags = packetFlags;
2223
Peers = peers;
2324
}
2425
}

0 commit comments

Comments
 (0)