Don't send unhandled skill and attribute requests to joining players

pull/76/head
David Cernat 8 years ago
parent 79c561057c
commit 9690e007df

@ -122,7 +122,7 @@ void Networking::Update(RakNet::Packet *packet)
return;
}
}
else if(packet->data[0] == ID_GAME_BASE_INFO)
else if (packet->data[0] == ID_GAME_BASE_INFO)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_BASE_INFO about %s",
player->Npc()->mName.c_str());
@ -352,8 +352,6 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid)
{
controller->GetPacket(ID_GAME_BASE_INFO)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_BASESTATS)->RequestData(guid);
controller->GetPacket(ID_GAME_ATTRIBUTE)->RequestData(guid);
controller->GetPacket(ID_GAME_SKILL)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_POS)->RequestData(guid);
controller->GetPacket(ID_GAME_CELL)->RequestData(guid);
controller->GetPacket(ID_GAME_UPDATE_EQUIPED)->RequestData(guid);

@ -468,6 +468,9 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
case ID_GAME_ATTRIBUTE:
{
if (packet->length == myPacket->headerSize())
return;
BasePlayer *__pl = nullptr;
MWWorld::Ptr __pl_ptr;
if (id == myid)
@ -497,6 +500,9 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
case ID_GAME_SKILL:
{
if (packet->length == myPacket->headerSize())
return;
BasePlayer *__pl = nullptr;
MWWorld::Ptr __pl_ptr;
if (id == myid)

Loading…
Cancel
Save