mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 17:46:47 +02:00
Merge pull request #7824 from sethalves/avatar-id-reliable
use reliable and ordered packets for avatar identity
This commit is contained in:
commit
47f8adf187
1 changed files with 9 additions and 4 deletions
|
@ -1193,10 +1193,15 @@ void AvatarData::sendIdentityPacket() {
|
|||
|
||||
QByteArray identityData = identityByteArray();
|
||||
|
||||
auto identityPacket = NLPacket::create(PacketType::AvatarIdentity, identityData.size());
|
||||
identityPacket->write(identityData);
|
||||
|
||||
nodeList->broadcastToNodes(std::move(identityPacket), NodeSet() << NodeType::AvatarMixer);
|
||||
auto packetList = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true);
|
||||
packetList->write(identityData);
|
||||
nodeList->eachMatchingNode(
|
||||
[&](const SharedNodePointer& node)->bool {
|
||||
return node->getType() == NodeType::AvatarMixer && node->getActiveSocket();
|
||||
},
|
||||
[&](const SharedNodePointer& node) {
|
||||
nodeList->sendPacketList(std::move(packetList), *node);
|
||||
});
|
||||
}
|
||||
|
||||
void AvatarData::sendBillboardPacket() {
|
||||
|
|
Loading…
Reference in a new issue