mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
More code cleanup (UNORDERED + RemotePlayer/LocalPlayer)
* ClientEnvironment now uses UNORDERED MAP for active objects * Use RemotePlayer and LocalPlayer everywhere it's possible * Minor code style fixes * Drop Client::getBreath() unused function
This commit is contained in:
parent
067766eec2
commit
fd5a130b86
10 changed files with 124 additions and 152 deletions
|
@ -1052,7 +1052,7 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt)
|
|||
message += (wchar_t)tmp_wchar;
|
||||
}
|
||||
|
||||
Player *player = m_env->getPlayer(pkt->getPeerId());
|
||||
RemotePlayer *player = m_env->getPlayer(pkt->getPeerId());
|
||||
if (player == NULL) {
|
||||
errorstream << "Server::ProcessData(): Canceling: "
|
||||
"No player for peer_id=" << pkt->getPeerId()
|
||||
|
@ -1179,7 +1179,7 @@ void Server::handleCommand_Password(NetworkPacket* pkt)
|
|||
newpwd += c;
|
||||
}
|
||||
|
||||
Player *player = m_env->getPlayer(pkt->getPeerId());
|
||||
RemotePlayer *player = m_env->getPlayer(pkt->getPeerId());
|
||||
if (player == NULL) {
|
||||
errorstream << "Server::ProcessData(): Canceling: "
|
||||
"No player for peer_id=" << pkt->getPeerId()
|
||||
|
@ -1255,7 +1255,7 @@ void Server::handleCommand_PlayerItem(NetworkPacket* pkt)
|
|||
|
||||
void Server::handleCommand_Respawn(NetworkPacket* pkt)
|
||||
{
|
||||
Player *player = m_env->getPlayer(pkt->getPeerId());
|
||||
RemotePlayer *player = m_env->getPlayer(pkt->getPeerId());
|
||||
if (player == NULL) {
|
||||
errorstream << "Server::ProcessData(): Canceling: "
|
||||
"No player for peer_id=" << pkt->getPeerId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue