mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +02:00
Fix flickering
This commit is contained in:
parent
5a5aa2f5b9
commit
b3d127c953
3 changed files with 13 additions and 12 deletions
|
@ -184,7 +184,6 @@ MyAvatar::MyAvatar(QThread* thread) :
|
||||||
if (recordingInterface->getPlayFromCurrentLocation()) {
|
if (recordingInterface->getPlayFromCurrentLocation()) {
|
||||||
setRecordingBasis();
|
setRecordingBasis();
|
||||||
}
|
}
|
||||||
createRecordingIDs();
|
|
||||||
_previousCollisionGroup = _characterController.computeCollisionGroup();
|
_previousCollisionGroup = _characterController.computeCollisionGroup();
|
||||||
_characterController.setCollisionless(true);
|
_characterController.setCollisionless(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -203,6 +202,7 @@ MyAvatar::MyAvatar(QThread* thread) :
|
||||||
|
|
||||||
connect(recorder.data(), &Recorder::recordingStateChanged, [=] {
|
connect(recorder.data(), &Recorder::recordingStateChanged, [=] {
|
||||||
if (recorder->isRecording()) {
|
if (recorder->isRecording()) {
|
||||||
|
createRecordingIDs();
|
||||||
setRecordingBasis();
|
setRecordingBasis();
|
||||||
} else {
|
} else {
|
||||||
clearRecordingBasis();
|
clearRecordingBasis();
|
||||||
|
|
|
@ -236,8 +236,6 @@ void Avatar::updateAvatarEntities() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
createRecordingIDs();
|
|
||||||
|
|
||||||
if (getID().isNull() ||
|
if (getID().isNull() ||
|
||||||
getID() == AVATAR_SELF_ID ||
|
getID() == AVATAR_SELF_ID ||
|
||||||
DependencyManager::get<NodeList>()->getSessionUUID() == QUuid()) {
|
DependencyManager::get<NodeList>()->getSessionUUID() == QUuid()) {
|
||||||
|
@ -368,6 +366,9 @@ void Avatar::updateAvatarEntities() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (avatarEntities.size() != _avatarEntityForRecording.size()) {
|
||||||
|
createRecordingIDs();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setAvatarEntityDataChanged(false);
|
setAvatarEntityDataChanged(false);
|
||||||
|
|
|
@ -2443,15 +2443,15 @@ void AvatarData::fromJson(const QJsonObject& json, bool useFrameSkeleton) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json.contains(JSON_AVATAR_ENTITIES) && json[JSON_AVATAR_ENTITIES].isArray()) {
|
if (json.contains(JSON_AVATAR_ENTITIES) && json[JSON_AVATAR_ENTITIES].isArray()) {
|
||||||
QJsonArray attachmentsJson = json[JSON_AVATAR_ENTITIES].toArray();
|
QJsonArray attachmentsJson = json[JSON_AVATAR_ENTITIES].toArray();
|
||||||
for (auto attachmentJson : attachmentsJson) {
|
for (auto attachmentJson : attachmentsJson) {
|
||||||
if (attachmentJson.isObject()) {
|
if (attachmentJson.isObject()) {
|
||||||
QVariantMap entityData = attachmentJson.toObject().toVariantMap();
|
QVariantMap entityData = attachmentJson.toObject().toVariantMap();
|
||||||
QUuid entityID = entityData.value("id").toUuid();
|
QUuid entityID = entityData.value("id").toUuid();
|
||||||
QByteArray properties = QByteArray::fromBase64(entityData.value("properties").toByteArray());
|
QByteArray properties = QByteArray::fromBase64(entityData.value("properties").toByteArray());
|
||||||
updateAvatarEntity(entityID, properties);
|
updateAvatarEntity(entityID, properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json.contains(JSON_AVATAR_JOINT_ARRAY)) {
|
if (json.contains(JSON_AVATAR_JOINT_ARRAY)) {
|
||||||
|
|
Loading…
Reference in a new issue