mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
fix for unpack of OctreeQuery
This commit is contained in:
parent
fc03d25155
commit
ed41412d95
4 changed files with 9 additions and 4 deletions
|
@ -450,7 +450,11 @@ int OctreeSendThread::packetDistributor(SharedNodePointer node, OctreeQueryNode*
|
|||
// it seems like it may be a good idea to include the lock time as part of the encode time
|
||||
// are reported to client. Since you can encode without the lock
|
||||
nodeData->stats.encodeStarted();
|
||||
|
||||
|
||||
if (node->getType() == NodeType::EntityScriptServer) {
|
||||
qDebug() << "Encoding tree bitstream for" << node->getUUID();
|
||||
}
|
||||
|
||||
bytesWritten = _myServer->getOctree()->encodeTreeBitstream(subTree, &_packetData, nodeData->elementBag, params);
|
||||
|
||||
quint64 encodeEnd = usecTimestampNow();
|
||||
|
|
|
@ -224,6 +224,7 @@ void EntityScriptServer::shutdown() {
|
|||
}
|
||||
|
||||
void EntityScriptServer::addingEntity(const EntityItemID& entityID) {
|
||||
qDebug() << "adding " << entityID;
|
||||
checkAndCallPreload(entityID);
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData
|
|||
int numberOfEntitiesOffset = 0;
|
||||
withReadLock([&] {
|
||||
QVector<uint16_t> indexesOfEntitiesToInclude;
|
||||
|
||||
|
||||
// It's possible that our element has been previous completed. In this case we'll simply not include any of our
|
||||
// entities for encoding. This is needed because we encode the element data at the "parent" level, and so we
|
||||
// need to handle the case where our sibling elements need encoding but we don't.
|
||||
|
@ -300,6 +300,7 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData
|
|||
auto jsonFilters = entityNodeData->getJSONParameters();
|
||||
|
||||
if (!jsonFilters.isEmpty()) {
|
||||
|
||||
// if params include JSON filters, check if this entity matches
|
||||
bool entityMatchesFilters = entity->matchesJSONFilters(jsonFilters);
|
||||
|
||||
|
@ -322,7 +323,6 @@ OctreeElement::AppendState EntityTreeElement::appendElementData(OctreePacketData
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (hadElementExtraData) {
|
||||
includeThisEntity = includeThisEntity &&
|
||||
|
|
|
@ -90,7 +90,7 @@ int OctreeQuery::parseData(ReceivedMessage& message) {
|
|||
|
||||
// check if this query uses a view frustum
|
||||
memcpy(&_usesFrustum, sourceBuffer, sizeof(_usesFrustum));
|
||||
sourceBuffer += _usesFrustum;
|
||||
sourceBuffer += sizeof(_usesFrustum);
|
||||
|
||||
if (_usesFrustum) {
|
||||
// unpack camera details
|
||||
|
|
Loading…
Reference in a new issue