mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:23:04 +02:00
logging change
This commit is contained in:
parent
957b1d9ae4
commit
90c9c5b137
1 changed files with 9 additions and 7 deletions
|
@ -938,7 +938,6 @@ bool EntityTree::filterProperties(EntityItemProperties& propertiesIn, EntityItem
|
||||||
propertiesIn.setDesiredProperties(oldProperties);
|
propertiesIn.setDesiredProperties(oldProperties);
|
||||||
|
|
||||||
auto in = QJsonValue::fromVariant(inputValues.toVariant()); // grab json copy now, because the inputValues might be side effected by the filter.
|
auto in = QJsonValue::fromVariant(inputValues.toVariant()); // grab json copy now, because the inputValues might be side effected by the filter.
|
||||||
qDebug() << "fixme filter input" << propertiesIn << inputValues.toVariant() << in;
|
|
||||||
QScriptValueList args;
|
QScriptValueList args;
|
||||||
args << inputValues;
|
args << inputValues;
|
||||||
|
|
||||||
|
@ -950,12 +949,17 @@ bool EntityTree::filterProperties(EntityItemProperties& propertiesIn, EntityItem
|
||||||
// Javascript objects are == only if they are the same object. To compare arbitrary values, we need to use JSON.
|
// Javascript objects are == only if they are the same object. To compare arbitrary values, we need to use JSON.
|
||||||
|
|
||||||
auto out = QJsonValue::fromVariant(result.toVariant());
|
auto out = QJsonValue::fromVariant(result.toVariant());
|
||||||
bool eq = in == out;
|
wasChanged = in != out;
|
||||||
qDebug() << "in:" << in << "out:" << out << "eq:" << eq;
|
if (wasChanged) {
|
||||||
wasChanged = !eq;
|
// Logging will be removed eventually, but for now, the behavior is so fragile that it's worth logging.
|
||||||
|
qCDebug(entities) << "filter accepted. changed:" << wasChanged;
|
||||||
|
qCDebug(entities) << " in:" << in;
|
||||||
|
qCDebug(entities) << " out:" << out;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qCDebug(entities) << "filter rejected. in:" << in;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "fixme filter accepted:" << accepted << " changed : " << (accepted && wasChanged) << " result:" << propertiesOut << result.toVariant();
|
|
||||||
return accepted;
|
return accepted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,11 +1060,9 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
||||||
if (!allowed || wasChanged) {
|
if (!allowed || wasChanged) {
|
||||||
bumpTimestamp(properties);
|
bumpTimestamp(properties);
|
||||||
if (properties.getSimulationOwner().getID() == senderNode->getUUID()) {
|
if (properties.getSimulationOwner().getID() == senderNode->getUUID()) {
|
||||||
qDebug() << "fixme Suppressing ownership from" << senderNode->getUUID();
|
|
||||||
properties.setSimulationOwner(QUuid(), 0);
|
properties.setSimulationOwner(QUuid(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << "fixme final:" << properties;
|
|
||||||
endFilter = usecTimestampNow();
|
endFilter = usecTimestampNow();
|
||||||
|
|
||||||
// search for the entity by EntityItemID
|
// search for the entity by EntityItemID
|
||||||
|
|
Loading…
Reference in a new issue