bool OnSendPacket(RakNet::BitStream* bs, PacketPriority& priority, PacketReliability& reliability, char& ordChannel)
{
if (state && +(*bs->GetData()) == 215 && bs->GetNumberOfBytesUsed() > 6)
{
uint16_t style;
bs->IgnoreBits(8);
bs->Read(style);
if (style == 2)
{
uint32_t length;
bs->IgnoreBits(32);
bs->Read(length);
std::string text(length, '\0');
bs->Read(text.data(), text.size());
if (text == "OnPlayerDeviceLost")
{
return false;
}
}
}
return true;
}