Only send information to POSTLOADED player about other POSTLOADED ones

This commit is contained in:
David Cernat 2016-10-31 01:14:17 +02:00
parent cd798d5f23
commit 373011f883

View file

@ -714,6 +714,9 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid)
// If an invalid key makes it into the Players map, ignore it // If an invalid key makes it into the Players map, ignore it
else if (pl->first == -1) continue; else if (pl->first == -1) continue;
// If we are iterating over a player who has inputted their name, proceed
else if (pl->second->LoadedState() == Player::POSTLOADED)
{
playerController->GetPacket(ID_GAME_BASE_INFO)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_BASE_INFO)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_DYNAMICSTATS)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_DYNAMICSTATS)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid);
@ -722,6 +725,7 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid)
playerController->GetPacket(ID_GAME_CELL)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_CELL)->Send(pl->second, guid);
playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid);
} }
}
LOG_APPEND(Log::LOG_WARN, "%s", "- Done"); LOG_APPEND(Log::LOG_WARN, "%s", "- Done");