From 956b573323f8b7bbc9d84a821880d8b34d85db1e Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 9 May 2017 00:38:48 +0800 Subject: [PATCH] [General] Use different ordering channels for packets --- components/openmw-mp/Packets/Actor/ActorPacket.cpp | 1 + components/openmw-mp/Packets/Player/PacketChatMessage.cpp | 1 + components/openmw-mp/Packets/Player/PacketConsole.hpp | 1 + components/openmw-mp/Packets/Player/PacketDisconnect.hpp | 1 + components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp | 1 + components/openmw-mp/Packets/Player/PacketHandshake.cpp | 1 + components/openmw-mp/Packets/Player/PacketLoaded.hpp | 1 + components/openmw-mp/Packets/Player/PacketSendMyID.hpp | 1 + components/openmw-mp/Packets/Player/PacketTime.cpp | 1 + components/openmw-mp/Packets/Player/PlayerPacket.cpp | 1 + components/openmw-mp/Packets/World/WorldPacket.cpp | 1 + 11 files changed, 11 insertions(+) diff --git a/components/openmw-mp/Packets/Actor/ActorPacket.cpp b/components/openmw-mp/Packets/Actor/ActorPacket.cpp index fef7d9a64..3496101dc 100644 --- a/components/openmw-mp/Packets/Actor/ActorPacket.cpp +++ b/components/openmw-mp/Packets/Actor/ActorPacket.cpp @@ -10,6 +10,7 @@ ActorPacket::ActorPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) packetID = 0; priority = HIGH_PRIORITY; reliability = RELIABLE_ORDERED; + orderChannel = CHANNEL_ACTOR; this->peer = peer; } diff --git a/components/openmw-mp/Packets/Player/PacketChatMessage.cpp b/components/openmw-mp/Packets/Player/PacketChatMessage.cpp index b9e0a68fd..83ea3ce52 100644 --- a/components/openmw-mp/Packets/Player/PacketChatMessage.cpp +++ b/components/openmw-mp/Packets/Player/PacketChatMessage.cpp @@ -8,6 +8,7 @@ mwmp::PacketChatMessage::PacketChatMessage(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_CHAT_MESSAGE; + orderChannel = CHANNEL_SYSTEM; } void mwmp::PacketChatMessage::Packet(RakNet::BitStream *bs, bool send) diff --git a/components/openmw-mp/Packets/Player/PacketConsole.hpp b/components/openmw-mp/Packets/Player/PacketConsole.hpp index ea207412c..1b6571e97 100644 --- a/components/openmw-mp/Packets/Player/PacketConsole.hpp +++ b/components/openmw-mp/Packets/Player/PacketConsole.hpp @@ -16,6 +16,7 @@ namespace mwmp PacketConsole(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_GAME_CONSOLE; + orderChannel = CHANNEL_SYSTEM; } void Packet(RakNet::BitStream *bs, bool send) { diff --git a/components/openmw-mp/Packets/Player/PacketDisconnect.hpp b/components/openmw-mp/Packets/Player/PacketDisconnect.hpp index 39cdbcbc1..c6d87d1af 100644 --- a/components/openmw-mp/Packets/Player/PacketDisconnect.hpp +++ b/components/openmw-mp/Packets/Player/PacketDisconnect.hpp @@ -16,6 +16,7 @@ namespace mwmp PacketDisconnect(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_USER_DISCONNECTED; + orderChannel = CHANNEL_SYSTEM; } }; } diff --git a/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp b/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp index 2b63ce91f..1dd233f27 100644 --- a/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp +++ b/components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp @@ -10,6 +10,7 @@ using namespace mwmp; PacketGUIBoxes::PacketGUIBoxes(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_GUI_MESSAGEBOX; + orderChannel = CHANNEL_SYSTEM; } void PacketGUIBoxes::Packet(RakNet::BitStream *bs, bool send) diff --git a/components/openmw-mp/Packets/Player/PacketHandshake.cpp b/components/openmw-mp/Packets/Player/PacketHandshake.cpp index 5078426a0..bb6ba0ce7 100644 --- a/components/openmw-mp/Packets/Player/PacketHandshake.cpp +++ b/components/openmw-mp/Packets/Player/PacketHandshake.cpp @@ -10,6 +10,7 @@ using namespace mwmp; PacketHandshake::PacketHandshake(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_HANDSHAKE; + orderChannel = CHANNEL_SYSTEM; } void PacketHandshake::Packet(RakNet::BitStream *bs, bool send) diff --git a/components/openmw-mp/Packets/Player/PacketLoaded.hpp b/components/openmw-mp/Packets/Player/PacketLoaded.hpp index 8f58a4938..f26dc5353 100644 --- a/components/openmw-mp/Packets/Player/PacketLoaded.hpp +++ b/components/openmw-mp/Packets/Player/PacketLoaded.hpp @@ -15,6 +15,7 @@ namespace mwmp PacketLoaded(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_LOADED; + orderChannel = CHANNEL_SYSTEM; } }; } diff --git a/components/openmw-mp/Packets/Player/PacketSendMyID.hpp b/components/openmw-mp/Packets/Player/PacketSendMyID.hpp index 5e6fa802c..2bd78b772 100644 --- a/components/openmw-mp/Packets/Player/PacketSendMyID.hpp +++ b/components/openmw-mp/Packets/Player/PacketSendMyID.hpp @@ -16,6 +16,7 @@ namespace mwmp PacketSendMyID(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_USER_MYID; + orderChannel = CHANNEL_SYSTEM; } }; } diff --git a/components/openmw-mp/Packets/Player/PacketTime.cpp b/components/openmw-mp/Packets/Player/PacketTime.cpp index f21719faf..2458f5621 100644 --- a/components/openmw-mp/Packets/Player/PacketTime.cpp +++ b/components/openmw-mp/Packets/Player/PacketTime.cpp @@ -10,6 +10,7 @@ using namespace mwmp; PacketTime::PacketTime(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_GAME_TIME; + orderChannel = CHANNEL_SYSTEM; } void PacketTime::Packet(RakNet::BitStream *bs, bool send) diff --git a/components/openmw-mp/Packets/Player/PlayerPacket.cpp b/components/openmw-mp/Packets/Player/PlayerPacket.cpp index 649e75426..a0544809d 100644 --- a/components/openmw-mp/Packets/Player/PlayerPacket.cpp +++ b/components/openmw-mp/Packets/Player/PlayerPacket.cpp @@ -10,6 +10,7 @@ PlayerPacket::PlayerPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) packetID = 0; priority = HIGH_PRIORITY; reliability = RELIABLE_ORDERED; + orderChannel = CHANNEL_PLAYER; this->peer = peer; } diff --git a/components/openmw-mp/Packets/World/WorldPacket.cpp b/components/openmw-mp/Packets/World/WorldPacket.cpp index 25f316de8..9cf4c52e0 100644 --- a/components/openmw-mp/Packets/World/WorldPacket.cpp +++ b/components/openmw-mp/Packets/World/WorldPacket.cpp @@ -10,6 +10,7 @@ WorldPacket::WorldPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) packetID = 0; priority = HIGH_PRIORITY; reliability = RELIABLE_ORDERED; + orderChannel = CHANNEL_WORLDEVENT; this->peer = peer; }