mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +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
|
@ -575,10 +575,10 @@ RemotePlayer *ServerEnvironment::getPlayer(const session_t peer_id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
RemotePlayer *ServerEnvironment::getPlayer(const char* name, bool match_invalid_peer)
|
||||
RemotePlayer *ServerEnvironment::getPlayer(const std::string &name, bool match_invalid_peer)
|
||||
{
|
||||
for (RemotePlayer *player : m_players) {
|
||||
if (strcmp(player->getName(), name) != 0)
|
||||
if (player->getName() != name)
|
||||
continue;
|
||||
|
||||
if (match_invalid_peer || player->getPeerId() != PEER_ID_INEXISTENT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue