mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
CR fixes for octree classes
This commit is contained in:
parent
2944746629
commit
ff18a05507
2 changed files with 3 additions and 3 deletions
|
@ -108,9 +108,9 @@ bool OctreeQueryNode::packetIsDuplicate() const {
|
||||||
// since our packets now include header information, like sequence number, and createTime, we can't just do a memcmp
|
// since our packets now include header information, like sequence number, and createTime, we can't just do a memcmp
|
||||||
// of the entire packet, we need to compare only the packet content...
|
// of the entire packet, we need to compare only the packet content...
|
||||||
|
|
||||||
if (_lastOctreePacketLength == getPacketLength()) {
|
if (_lastOctreePacketLength == _octreePacket->getSizeUsed()) {
|
||||||
if (memcmp(_lastOctreePayload + OCTREE_PACKET_EXTRA_HEADERS_SIZE,
|
if (memcmp(_lastOctreePayload + OCTREE_PACKET_EXTRA_HEADERS_SIZE,
|
||||||
_octreePacket->getPayload() + OCTREE_PACKET_EXTRA_HEADERS_SIZE,
|
_octreePacket->getPayload() + OCTREE_PACKET_EXTRA_HEADERS_SIZE,
|
||||||
_octreePacket->getSizeUsed() - OCTREE_PACKET_EXTRA_HEADERS_SIZE) == 0) {
|
_octreePacket->getSizeUsed() - OCTREE_PACKET_EXTRA_HEADERS_SIZE) == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ int OctreeSendThread::handlePacketSend(OctreeQueryNode* nodeData, int& trueBytes
|
||||||
NLPacket& statsPacket = nodeData->stats.getStatsMessage();
|
NLPacket& statsPacket = nodeData->stats.getStatsMessage();
|
||||||
|
|
||||||
// If the size of the stats message and the octree message will fit in a packet, then piggyback them
|
// If the size of the stats message and the octree message will fit in a packet, then piggyback them
|
||||||
if (nodeData->getPacket()->getSizeUsed() < statsPacket->bytesAvailable()) {
|
if (nodeData->getPacket()->getSizeWithHeader() < statsPacket->bytesAvailable()) {
|
||||||
|
|
||||||
// copy octree message to back of stats message
|
// copy octree message to back of stats message
|
||||||
statsPacket->write(nodeData->getPacket()->getData(), nodeData->getPacket()->getSizeWithHeader());
|
statsPacket->write(nodeData->getPacket()->getData(), nodeData->getPacket()->getSizeWithHeader());
|
||||||
|
|
Loading…
Reference in a new issue