mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 10:48:15 +02:00
pass UUID from data-server to avatar-mixer
This commit is contained in:
parent
6bd71da84e
commit
8bac70e4a5
3 changed files with 11 additions and 4 deletions
|
@ -35,6 +35,13 @@ void Profile::setUsername(const QString &username) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Profile::setUUID(const QUuid& uuid) {
|
||||||
|
_uuid = uuid;
|
||||||
|
|
||||||
|
// when the UUID is changed we need set it appropriately on our avatar instance
|
||||||
|
Application::getInstance()->getAvatar()->setUUID(_uuid);
|
||||||
|
}
|
||||||
|
|
||||||
void Profile::saveData(QSettings* settings) {
|
void Profile::saveData(QSettings* settings) {
|
||||||
settings->beginGroup("Profile");
|
settings->beginGroup("Profile");
|
||||||
|
|
||||||
|
@ -49,7 +56,7 @@ void Profile::loadData(QSettings* settings) {
|
||||||
settings->beginGroup("Profile");
|
settings->beginGroup("Profile");
|
||||||
|
|
||||||
_username = settings->value("username").toString();
|
_username = settings->value("username").toString();
|
||||||
_uuid = settings->value("UUID").toUuid();
|
this->setUUID(settings->value("UUID").toUuid());
|
||||||
_faceModelURL = settings->value("faceModelURL").toUrl();
|
_faceModelURL = settings->value("faceModelURL").toUrl();
|
||||||
|
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
void setUsername(const QString& username);
|
void setUsername(const QString& username);
|
||||||
QString& getUsername() { return _username; }
|
QString& getUsername() { return _username; }
|
||||||
|
|
||||||
void setUUID(const QUuid& uuid) { _uuid = uuid; }
|
void setUUID(const QUuid& uuid);
|
||||||
QUuid& getUUID() { return _uuid; }
|
QUuid& getUUID() { return _uuid; }
|
||||||
|
|
||||||
void setFaceModelURL(const QUrl& faceModelURL) { _faceModelURL = faceModelURL; }
|
void setFaceModelURL(const QUrl& faceModelURL) { _faceModelURL = faceModelURL; }
|
||||||
|
|
|
@ -119,7 +119,7 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
|
||||||
|
|
||||||
// UUID
|
// UUID
|
||||||
QByteArray uuidByteArray = _uuid.toRfc4122();
|
QByteArray uuidByteArray = _uuid.toRfc4122();
|
||||||
memcpy(destinationBuffer, &uuidByteArray, uuidByteArray.size());
|
memcpy(destinationBuffer, uuidByteArray.constData(), uuidByteArray.size());
|
||||||
destinationBuffer += uuidByteArray.size();
|
destinationBuffer += uuidByteArray.size();
|
||||||
|
|
||||||
// Body world position
|
// Body world position
|
||||||
|
@ -270,7 +270,7 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||||
sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &_bodyRoll);
|
sourceBuffer += unpackFloatAngleFromTwoByte((uint16_t*) sourceBuffer, &_bodyRoll);
|
||||||
|
|
||||||
// Body scale
|
// Body scale
|
||||||
sourceBuffer += unpackFloatRatioFromTwoByte( sourceBuffer, _newScale);
|
sourceBuffer += unpackFloatRatioFromTwoByte(sourceBuffer, _newScale);
|
||||||
|
|
||||||
// Follow mode info
|
// Follow mode info
|
||||||
memcpy(&_leaderID, sourceBuffer, sizeof(uint16_t));
|
memcpy(&_leaderID, sourceBuffer, sizeof(uint16_t));
|
||||||
|
|
Loading…
Reference in a new issue