鏡像自
https://github.com/luanti-org/luanti.git
已同步 2025-12-23 23:15:30 +01:00
Remove unused ConnectionCommand::sendToAll function. NetworkPacket::oldForgePacket returns Buffer instead of SharedBuffer and is used in ConnectionCommand instead of Connection::Send
This remove the NetworkPacket buffer => SharedBuffer => Buffer copy. Now NetworkPacket => Buffer
此提交包含在:
@@ -437,19 +437,12 @@ struct ConnectionCommand
|
||||
peer_id = peer_id_;
|
||||
}
|
||||
void send(u16 peer_id_, u8 channelnum_,
|
||||
SharedBuffer<u8> data_, bool reliable_)
|
||||
NetworkPacket* pkt, bool reliable_)
|
||||
{
|
||||
type = CONNCMD_SEND;
|
||||
peer_id = peer_id_;
|
||||
channelnum = channelnum_;
|
||||
data = data_;
|
||||
reliable = reliable_;
|
||||
}
|
||||
void sendToAll(u8 channelnum_, SharedBuffer<u8> data_, bool reliable_)
|
||||
{
|
||||
type = CONNCMD_SEND_TO_ALL;
|
||||
channelnum = channelnum_;
|
||||
data = data_;
|
||||
data = pkt->oldForgePacket();
|
||||
reliable = reliable_;
|
||||
}
|
||||
|
||||
|
||||
新增問題並參考
封鎖使用者