1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Replace NetworkPacket pointers to references

This commit is contained in:
Loic Blot 2015-03-13 22:01:49 +01:00
parent 74d34da6cb
commit 083c8c734e
8 changed files with 256 additions and 295 deletions

View file

@ -626,12 +626,9 @@ void ClientInterface::UpdatePlayerList()
}
void ClientInterface::send(u16 peer_id, u8 channelnum,
NetworkPacket* pkt, bool reliable, bool deletepkt)
NetworkPacket* pkt, bool reliable)
{
m_con->Send(peer_id, channelnum, pkt, reliable);
if (deletepkt)
delete pkt;
}
void ClientInterface::sendToAll(u16 channelnum,
@ -647,8 +644,6 @@ void ClientInterface::sendToAll(u16 channelnum,
m_con->Send(client->peer_id, channelnum, pkt, reliable);
}
}
delete pkt;
}
RemoteClient* ClientInterface::getClientNoEx(u16 peer_id, ClientState state_min)