diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 3c8149e1c..a91747753 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -161,7 +161,7 @@ void Networking::ReciveMessage(RakNet::Packet *packet) { RakNet::RakNetGUID id; - if(packet->length < 3) + if(packet->length < 2) return; RakNet::BitStream bsIn(&packet->data[1], packet->length, false); diff --git a/components/openmw-mp/Packets/BasePacket.cpp b/components/openmw-mp/Packets/BasePacket.cpp index b32680650..848bc80af 100644 --- a/components/openmw-mp/Packets/BasePacket.cpp +++ b/components/openmw-mp/Packets/BasePacket.cpp @@ -16,7 +16,7 @@ void BasePacket::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) if(send) { - bs->Write((RakNet::MessageID) packetID); + bs->Write(packetID); bs->Write(player->guid); } } @@ -66,7 +66,7 @@ void BasePacket::SetSendStream(RakNet::BitStream *bitStream) void BasePacket::RequestData(RakNet::RakNetGUID player) { bsSend->ResetWritePointer(); - bsSend->Write((RakNet::MessageID) packetID); + bsSend->Write(packetID); bsSend->Write(player); peer->Send(bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, 0, player, false); } diff --git a/components/openmw-mp/Packets/BasePacket.hpp b/components/openmw-mp/Packets/BasePacket.hpp index 1cb10c855..fc5b371e3 100644 --- a/components/openmw-mp/Packets/BasePacket.hpp +++ b/components/openmw-mp/Packets/BasePacket.hpp @@ -35,7 +35,7 @@ namespace mwmp size_t headerSize() { - return 10; // 10 == char + char + RakNetGUID (uint64_t) + return 9; // 9 == packetID + RakNetGUID (uint64_t) } protected: