mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge pull request #8850 from zzmp/fix/model-attachment-lifetime
ensure model attachment lifetimes
This commit is contained in:
commit
e247f0aa34
1 changed files with 2 additions and 2 deletions
|
@ -603,14 +603,14 @@ void Avatar::fixupModelsInScene() {
|
|||
_skeletonModel->removeFromScene(scene, pendingChanges);
|
||||
_skeletonModel->addToScene(scene, pendingChanges);
|
||||
}
|
||||
for (auto& attachmentModel : _attachmentModels) {
|
||||
for (auto attachmentModel : _attachmentModels) {
|
||||
if (attachmentModel->isRenderable() && attachmentModel->needsFixupInScene()) {
|
||||
attachmentModel->removeFromScene(scene, pendingChanges);
|
||||
attachmentModel->addToScene(scene, pendingChanges);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& attachmentModelToRemove : _attachmentsToRemove) {
|
||||
for (auto attachmentModelToRemove : _attachmentsToRemove) {
|
||||
attachmentModelToRemove->removeFromScene(scene, pendingChanges);
|
||||
}
|
||||
_attachmentsToDelete.insert(_attachmentsToDelete.end(), _attachmentsToRemove.begin(), _attachmentsToRemove.end());
|
||||
|
|
Loading…
Reference in a new issue