mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 15:02:10 +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()) {
|
||||
setRecordingBasis();
|
||||
}
|
||||
createRecordingIDs();
|
||||
_previousCollisionGroup = _characterController.computeCollisionGroup();
|
||||
_characterController.setCollisionless(true);
|
||||
} else {
|
||||
|
@ -203,6 +202,7 @@ MyAvatar::MyAvatar(QThread* thread) :
|
|||
|
||||
connect(recorder.data(), &Recorder::recordingStateChanged, [=] {
|
||||
if (recorder->isRecording()) {
|
||||
createRecordingIDs();
|
||||
setRecordingBasis();
|
||||
} else {
|
||||
clearRecordingBasis();
|
||||
|
|
|
@ -236,8 +236,6 @@ void Avatar::updateAvatarEntities() {
|
|||
return;
|
||||
}
|
||||
|
||||
createRecordingIDs();
|
||||
|
||||
if (getID().isNull() ||
|
||||
getID() == AVATAR_SELF_ID ||
|
||||
DependencyManager::get<NodeList>()->getSessionUUID() == QUuid()) {
|
||||
|
@ -368,6 +366,9 @@ void Avatar::updateAvatarEntities() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (avatarEntities.size() != _avatarEntityForRecording.size()) {
|
||||
createRecordingIDs();
|
||||
}
|
||||
});
|
||||
|
||||
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()) {
|
||||
QJsonArray attachmentsJson = json[JSON_AVATAR_ENTITIES].toArray();
|
||||
for (auto attachmentJson : attachmentsJson) {
|
||||
if (attachmentJson.isObject()) {
|
||||
QVariantMap entityData = attachmentJson.toObject().toVariantMap();
|
||||
QUuid entityID = entityData.value("id").toUuid();
|
||||
QByteArray properties = QByteArray::fromBase64(entityData.value("properties").toByteArray());
|
||||
updateAvatarEntity(entityID, properties);
|
||||
}
|
||||
}
|
||||
QJsonArray attachmentsJson = json[JSON_AVATAR_ENTITIES].toArray();
|
||||
for (auto attachmentJson : attachmentsJson) {
|
||||
if (attachmentJson.isObject()) {
|
||||
QVariantMap entityData = attachmentJson.toObject().toVariantMap();
|
||||
QUuid entityID = entityData.value("id").toUuid();
|
||||
QByteArray properties = QByteArray::fromBase64(entityData.value("properties").toByteArray());
|
||||
updateAvatarEntity(entityID, properties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (json.contains(JSON_AVATAR_JOINT_ARRAY)) {
|
||||
|
|
Loading…
Reference in a new issue