Fix 2 log messages when player joined to game (#9477)

This commit is contained in:
Maksim 2020-03-08 18:24:32 +01:00 committed by GitHub
parent c49575ef97
commit 0cb34ce158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1018,16 +1018,15 @@ PlayerSAO* Server::StageTwoClientInit(session_t peer_id)
// Send Breath // Send Breath
SendPlayerBreath(playersao); SendPlayerBreath(playersao);
Address addr = getPeerAddress(player->getPeerId());
std::string ip_str = addr.serializeString();
actionstream<<player->getName() <<" [" << ip_str << "] joins game. " << std::endl;
/* /*
Print out action Print out action
*/ */
{ {
Address addr = getPeerAddress(player->getPeerId());
std::string ip_str = addr.serializeString();
const std::vector<std::string> &names = m_clients.getPlayerNames(); const std::vector<std::string> &names = m_clients.getPlayerNames();
actionstream << player->getName() << " joins game. List of players: "; actionstream << player->getName() << " [" << ip_str << "] joins game. List of players: ";
for (const std::string &name : names) { for (const std::string &name : names) {
actionstream << name << " "; actionstream << name << " ";