Merge pull request #12899 from kitely/warn-property-too-large

Log a warning if an entity's property is too large
This commit is contained in:
Shannon Romano 2019-01-15 12:00:04 -08:00 committed by GitHub
commit 4b34465113
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,13 @@ void EntityEditPacketSender::queueEditEntityMessage(PacketType type,
while (encodeResult == OctreeElement::PARTIAL) {
encodeResult = EntityItemProperties::encodeEntityEditPacket(type, entityItemID, propertiesCopy, bufferOut, requestedProperties, didntFitProperties);
if (encodeResult != OctreeElement::NONE) {
if (encodeResult == OctreeElement::NONE) {
// This can happen for two reasons:
// 1. One of the properties is too large to fit in a single packet.
// 2. The requested properties don't exist in this entity type (e.g., 'modelUrl' in a Zone Entity).
// Since case #1 is more likely (and more critical), that's the one we warn about.
qCWarning(entities).nospace() << "queueEditEntityMessage: some of the properties don't fit and can't be sent. entityID=" << uuidStringWithoutCurlyBraces(entityItemID);
} else {
#ifdef WANT_DEBUG
qCDebug(entities) << "calling queueOctreeEditMessage()...";
qCDebug(entities) << " id:" << entityItemID;