mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Switch player names to std::string
This commit is contained in:
parent
603eb57943
commit
cc8e7a569e
18 changed files with 39 additions and 36 deletions
|
@ -1153,7 +1153,7 @@ PlayerSAO* Server::StageTwoClientInit(session_t peer_id)
|
|||
*/
|
||||
{
|
||||
NetworkPacket notice_pkt(TOCLIENT_UPDATE_PLAYER_LIST, 0, PEER_ID_INEXISTENT);
|
||||
notice_pkt << (u8) PLAYER_LIST_ADD << (u16) 1 << std::string(player->getName());
|
||||
notice_pkt << (u8) PLAYER_LIST_ADD << (u16) 1 << player->getName();
|
||||
m_clients.sendToAll(¬ice_pkt);
|
||||
}
|
||||
{
|
||||
|
@ -3176,7 +3176,7 @@ std::string Server::getStatusString()
|
|||
RemotePlayer *player = m_env->getPlayer(client_id);
|
||||
|
||||
// Get name of player
|
||||
const char *name = player ? player->getName() : "<unknown>";
|
||||
const std::string name = player ? player->getName() : "<unknown>";
|
||||
|
||||
// Add name to information string
|
||||
if (!first)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue