mirror of
https://gitea.sffnetwork.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-11-24 19:39:47 +00:00
FEAT: Message for outdated clients
This commit is contained in:
parent
97b0fb4d46
commit
eed3a6df61
1 changed files with 5 additions and 3 deletions
|
|
@ -203,9 +203,6 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& source, LoginPac
|
||||||
if (oldClient || oldServer)
|
if (oldClient || oldServer)
|
||||||
loginStatus = oldClient? LoginStatus::Failed_ClientOld : LoginStatus::Failed_ServerOld;
|
loginStatus = oldClient? LoginStatus::Failed_ClientOld : LoginStatus::Failed_ServerOld;
|
||||||
|
|
||||||
if (packet->newProto) {
|
|
||||||
printf("New proto! \n");
|
|
||||||
}
|
|
||||||
RakNet::BitStream bitStream;
|
RakNet::BitStream bitStream;
|
||||||
LoginStatusPacket(loginStatus).write(&bitStream);
|
LoginStatusPacket(loginStatus).write(&bitStream);
|
||||||
rakPeer->Send(&bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, source, false);
|
rakPeer->Send(&bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, source, false);
|
||||||
|
|
@ -252,6 +249,11 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& source, LoginPac
|
||||||
).write(&bitStream);
|
).write(&bitStream);
|
||||||
|
|
||||||
rakPeer->Send(&bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, source, false);
|
rakPeer->Send(&bitStream, HIGH_PRIORITY, RELIABLE_ORDERED, 0, source, false);
|
||||||
|
|
||||||
|
if (!packet->newProto) {
|
||||||
|
MessagePacket packet("You're using outdated client. Some features disabled.");
|
||||||
|
raknetInstance->send(packet);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue