mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Merge pull request #5959 from huffman/fix-octree-inbound
Fix OctreeInboundPacketProcessor std_list crash
This commit is contained in:
commit
497cb89abd
1 changed files with 11 additions and 11 deletions
|
@ -238,7 +238,6 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto nackPacketList = NLPacketList::create(_myServer->getMyEditNackType());
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
int packetsSent = 0;
|
int packetsSent = 0;
|
||||||
|
|
||||||
|
@ -272,14 +271,15 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
|
|
||||||
auto it = missingSequenceNumbers.constBegin();
|
auto it = missingSequenceNumbers.constBegin();
|
||||||
|
|
||||||
|
if (it != missingSequenceNumbers.constEnd()) {
|
||||||
|
auto nackPacketList = NLPacketList::create(_myServer->getMyEditNackType());
|
||||||
|
|
||||||
while (it != missingSequenceNumbers.constEnd()) {
|
while (it != missingSequenceNumbers.constEnd()) {
|
||||||
unsigned short int sequenceNumber = *it;
|
unsigned short int sequenceNumber = *it;
|
||||||
nackPacketList->writePrimitive(sequenceNumber);
|
nackPacketList->writePrimitive(sequenceNumber);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (nackPacketList->getNumPackets()) {
|
|
||||||
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
||||||
|
|
||||||
packetsSent += nackPacketList->getNumPackets();
|
packetsSent += nackPacketList->getNumPackets();
|
||||||
|
|
Loading…
Reference in a new issue