forked from mirror/openmw-tes3mp
Fix a header size
This commit is contained in:
parent
114a11ea78
commit
1022b6b27c
3 changed files with 4 additions and 4 deletions
|
@ -161,7 +161,7 @@ void Networking::ReciveMessage(RakNet::Packet *packet)
|
||||||
{
|
{
|
||||||
RakNet::RakNetGUID id;
|
RakNet::RakNetGUID id;
|
||||||
|
|
||||||
if(packet->length < 3)
|
if(packet->length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RakNet::BitStream bsIn(&packet->data[1], packet->length, false);
|
RakNet::BitStream bsIn(&packet->data[1], packet->length, false);
|
||||||
|
|
|
@ -16,7 +16,7 @@ void BasePacket::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||||
|
|
||||||
if(send)
|
if(send)
|
||||||
{
|
{
|
||||||
bs->Write((RakNet::MessageID) packetID);
|
bs->Write(packetID);
|
||||||
bs->Write(player->guid);
|
bs->Write(player->guid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void BasePacket::SetSendStream(RakNet::BitStream *bitStream)
|
||||||
void BasePacket::RequestData(RakNet::RakNetGUID player)
|
void BasePacket::RequestData(RakNet::RakNetGUID player)
|
||||||
{
|
{
|
||||||
bsSend->ResetWritePointer();
|
bsSend->ResetWritePointer();
|
||||||
bsSend->Write((RakNet::MessageID) packetID);
|
bsSend->Write(packetID);
|
||||||
bsSend->Write(player);
|
bsSend->Write(player);
|
||||||
peer->Send(bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, 0, player, false);
|
peer->Send(bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, 0, player, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace mwmp
|
||||||
|
|
||||||
size_t headerSize()
|
size_t headerSize()
|
||||||
{
|
{
|
||||||
return 10; // 10 == char + char + RakNetGUID (uint64_t)
|
return 9; // 9 == packetID + RakNetGUID (uint64_t)
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in a new issue