|
@@ -446,20 +446,18 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
|
|
|
si->mode = mode;
|
|
|
}
|
|
|
|
|
|
- auto connID = static_cast<int>(c->connectionID);
|
|
|
+ logNetwork->info("Connection with client %d established. UUID: %s", static_cast<int>(c->connectionID), c->uuid);
|
|
|
|
|
|
- logNetwork->info("Connection with client %d established. UUID: %s", connID, c->uuid);
|
|
|
-
|
|
|
- PlayerConnectionID id = currentPlayerId;
|
|
|
for(auto & name : names)
|
|
|
{
|
|
|
- logNetwork->info("Client %d player: %s", connID, name);
|
|
|
+ logNetwork->info("Client %d player: %s", static_cast<int>(c->connectionID), name);
|
|
|
+ PlayerConnectionID id = vstd::next(currentPlayerId, 1);
|
|
|
|
|
|
ClientPlayer cp;
|
|
|
cp.connection = c->connectionID;
|
|
|
cp.name = name;
|
|
|
playerNames.try_emplace(id, cp);
|
|
|
- announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % connID));
|
|
|
+ announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % static_cast<int>(c->connectionID)));
|
|
|
|
|
|
//put new player in first slot with AI
|
|
|
for(auto & elem : si->playerInfos)
|
|
@@ -470,7 +468,6 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- id = vstd::next(id, 1);
|
|
|
}
|
|
|
}
|
|
|
|