mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +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();
|
QByteArray identityData = identityByteArray();
|
||||||
|
|
||||||
auto identityPacket = NLPacket::create(PacketType::AvatarIdentity, identityData.size());
|
auto packetList = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true);
|
||||||
identityPacket->write(identityData);
|
packetList->write(identityData);
|
||||||
|
nodeList->eachMatchingNode(
|
||||||
nodeList->broadcastToNodes(std::move(identityPacket), NodeSet() << NodeType::AvatarMixer);
|
[&](const SharedNodePointer& node)->bool {
|
||||||
|
return node->getType() == NodeType::AvatarMixer && node->getActiveSocket();
|
||||||
|
},
|
||||||
|
[&](const SharedNodePointer& node) {
|
||||||
|
nodeList->sendPacketList(std::move(packetList), *node);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::sendBillboardPacket() {
|
void AvatarData::sendBillboardPacket() {
|
||||||
|
|
Loading…
Reference in a new issue