[Server] Minor cleanup in Networking

This commit is contained in:
Koncord 2017-02-27 16:23:14 +08:00
parent 02487dce13
commit aa91126ce3

View file

@ -722,11 +722,7 @@ void Networking::update(RakNet::Packet *packet)
RakNet::BitStream bsIn(&packet->data[1], packet->length, false);
{
RakNet::RakNetGUID ignoredGUID;
bsIn.Read(ignoredGUID);
(void)ignoredGUID;
}
bsIn.IgnoreBytes((unsigned int) RakNet::RakNetGUID::size()); // Ignore GUID from received packet
if (player == 0)
{
@ -735,7 +731,7 @@ void Networking::update(RakNet::Packet *packet)
playerController->GetPacket(ID_HANDSHAKE)->RequestData(packet->guid);
Players::newPlayer(packet->guid);
player = Players::getPlayer(packet->guid);
playerController->GetPacket(ID_USER_MYID)->Send(Players::getPlayer(packet->guid), false);
playerController->GetPacket(ID_USER_MYID)->Send(player, false);
return;
}
else if (playerController->ContainsPacket(packet->data[0]))