From 373011f8838a880c5ca72b507af1151cd403ca54 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 31 Oct 2016 01:14:17 +0200 Subject: [PATCH] Only send information to POSTLOADED player about other POSTLOADED ones --- apps/openmw-mp/Networking.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 2d77209b8..a569792c5 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -714,13 +714,17 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) // If an invalid key makes it into the Players map, ignore it else if (pl->first == -1) continue; - playerController->GetPacket(ID_GAME_BASE_INFO)->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_SKILL)->Send(pl->second, guid); - playerController->GetPacket(ID_GAME_POS)->Send(pl->second, guid); - playerController->GetPacket(ID_GAME_CELL)->Send(pl->second, guid); - playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); + // 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_DYNAMICSTATS)->Send(pl->second, guid); + playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid); + playerController->GetPacket(ID_GAME_SKILL)->Send(pl->second, guid); + playerController->GetPacket(ID_GAME_POS)->Send(pl->second, guid); + playerController->GetPacket(ID_GAME_CELL)->Send(pl->second, guid); + playerController->GetPacket(ID_GAME_EQUIPMENT)->Send(pl->second, guid); + } } LOG_APPEND(Log::LOG_WARN, "%s", "- Done");