mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +02:00
Don't crash when ignoring not-present node
This commit is contained in:
parent
058faa8c0f
commit
78f1acfd62
1 changed files with 13 additions and 10 deletions
|
@ -437,17 +437,20 @@ void AvatarMixer::handleNodeIgnoreRequestPacket(QSharedPointer<ReceivedMessage>
|
||||||
while (message->getBytesLeftToRead()) {
|
while (message->getBytesLeftToRead()) {
|
||||||
// parse out the UUID being ignored from the packet
|
// parse out the UUID being ignored from the packet
|
||||||
QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID));
|
QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID));
|
||||||
// Reset the lastBroadcastTime for the ignored avatar to 0
|
|
||||||
// so the AvatarMixer knows it'll have to send identity data about the ignored avatar
|
|
||||||
// to the ignorer if the ignorer unignores.
|
|
||||||
nodeData->setLastBroadcastTime(ignoredUUID, 0);
|
|
||||||
|
|
||||||
// Reset the lastBroadcastTime for the ignorer (FROM THE PERSPECTIVE OF THE IGNORED) to 0
|
if (nodeList->nodeWithUUID(ignoredUUID)) {
|
||||||
// so the AvatarMixer knows it'll have to send identity data about the ignorer
|
// Reset the lastBroadcastTime for the ignored avatar to 0
|
||||||
// to the ignored if the ignorer unignores.
|
// so the AvatarMixer knows it'll have to send identity data about the ignored avatar
|
||||||
auto ignoredNode = nodeList->nodeWithUUID(ignoredUUID);
|
// to the ignorer if the ignorer unignores.
|
||||||
AvatarMixerClientData* ignoredNodeData = reinterpret_cast<AvatarMixerClientData*>(ignoredNode->getLinkedData());
|
nodeData->setLastBroadcastTime(ignoredUUID, 0);
|
||||||
ignoredNodeData->setLastBroadcastTime(senderNode->getUUID(), 0);
|
|
||||||
|
// Reset the lastBroadcastTime for the ignorer (FROM THE PERSPECTIVE OF THE IGNORED) to 0
|
||||||
|
// so the AvatarMixer knows it'll have to send identity data about the ignorer
|
||||||
|
// to the ignored if the ignorer unignores.
|
||||||
|
auto ignoredNode = nodeList->nodeWithUUID(ignoredUUID);
|
||||||
|
AvatarMixerClientData* ignoredNodeData = reinterpret_cast<AvatarMixerClientData*>(ignoredNode->getLinkedData());
|
||||||
|
ignoredNodeData->setLastBroadcastTime(senderNode->getUUID(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (addToIgnore) {
|
if (addToIgnore) {
|
||||||
senderNode->addIgnoredNode(ignoredUUID);
|
senderNode->addIgnoredNode(ignoredUUID);
|
||||||
|
|
Loading…
Reference in a new issue