delete old AvatarEntities on domain reset on login

This commit is contained in:
Andrew Meadows 2018-12-10 11:52:56 -08:00
parent c4115bece3
commit 121a591023
3 changed files with 8 additions and 2 deletions

View file

@ -6784,7 +6784,7 @@ void Application::clearDomainOctreeDetails() {
DependencyManager::get<recording::ClipCache>()->clearUnusedResources();
// we just deleted all of MyAvatar's AvatarEntities so we flag it to reload from settings
getMyAvatar()->rememberToReloadOfAvatarEntityDataFromSettings();
getMyAvatar()->rememberToReloadAvatarEntityDataFromSettings();
}
void Application::domainURLChanged(QUrl domainURL) {

View file

@ -1515,6 +1515,12 @@ void MyAvatar::updateAvatarEntities() {
}
void MyAvatar::rememberToReloadAvatarEntityDataFromSettings() {
AvatarEntityMap emptyMap;
setAvatarEntityData(emptyMap);
_reloadAvatarEntityDataFromSettings = true;
}
void MyAvatar::loadData() {
getHead()->setBasePitch(_headPitchSetting.get());

View file

@ -1187,7 +1187,7 @@ public:
glm::vec3 getNextPosition() { return _goToPending ? _goToPosition : getWorldPosition(); }
void updateAvatarEntities() override;
void rememberToReloadOfAvatarEntityDataFromSettings() { _reloadAvatarEntityDataFromSettings = true; }
void rememberToReloadAvatarEntityDataFromSettings();
/**jsdoc
* Create a new grab.