read UUIDs as UUIDs rather than as strings. more debugging prints

This commit is contained in:
Seth Alves 2015-04-16 15:33:43 -07:00
parent d7881f1891
commit ea8dcfa5b5
3 changed files with 6 additions and 2 deletions

View file

@ -569,7 +569,7 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
READ_ENTITY_PROPERTY_STRING(PROP_USER_DATA, setUserData);
if (args.bitstreamVersion >= VERSION_ENTITIES_HAVE_ACCELERATION) {
READ_ENTITY_PROPERTY_STRING(PROP_SIMULATOR_ID, setSimulatorID);
READ_ENTITY_PROPERTY_UUID(PROP_SIMULATOR_ID, setSimulatorID);
}
if (args.bitstreamVersion >= VERSION_ENTITIES_HAS_MARKETPLACE_ID) {

View file

@ -96,7 +96,8 @@
dataAt += sizeof(length); \
bytesRead += sizeof(length); \
QByteArray ba((const char*)dataAt, length); \
QUuid value = QUUid::fromRfc4122(ba); \
QUuid value = QUuid::fromRfc4122(ba); \
qDebug() << "UUID" << value; \
dataAt += length; \
bytesRead += length; \
if (overwriteLocalData) { \

View file

@ -191,8 +191,11 @@ bool EntityMotionState::shouldSendUpdate(uint32_t simulationFrame) {
QUuid myNodeID = nodeList->getSessionUUID();
QUuid simulatorID = _entity->getSimulatorID();
qDebug() << "XXX" << simulatorID << myNodeID;
if (!simulatorID.isNull() && simulatorID != myNodeID) {
// some other Node is simulating this, so don't broadcast our computations.
qDebug() << "NOT SENDING DUE TO NOT OWNER";
return false;
}