Various improvements to the networking

This commit is contained in:
Wojciech Figat
2022-11-23 12:12:37 +01:00
parent 8e41711e82
commit 2644b4d75a
5 changed files with 21 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ ENetPacketFlag ChannelTypeToPacketFlag(const NetworkChannelType channel)
int flag = 0; // Maybe use ENET_PACKET_FLAG_NO_ALLOCATE?
// Add reliable flag when it is "reliable" channel
if (channel > NetworkChannelType::UnreliableOrdered)
if (channel == NetworkChannelType::Reliable || channel == NetworkChannelType::ReliableOrdered)
flag |= ENET_PACKET_FLAG_RELIABLE;
// Use unsequenced flag when the flag is unreliable. We have to sequence all other packets.