mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-15 12:59:22 +02:00
Merge pull request #14411 from SamGondelman/fading
Fix for avatar flashing on fade out
This commit is contained in:
commit
60c538309a
3 changed files with 9 additions and 4 deletions
|
@ -480,8 +480,8 @@ public:
|
|||
protected:
|
||||
PayloadPointer _payload;
|
||||
ItemKey _key;
|
||||
ItemCell _cell{ INVALID_CELL };
|
||||
Index _transitionId{ INVALID_INDEX };
|
||||
ItemCell _cell { INVALID_CELL };
|
||||
Index _transitionId { INVALID_INDEX };
|
||||
|
||||
friend class Scene;
|
||||
};
|
||||
|
|
|
@ -391,7 +391,12 @@ void Scene::transitionItems(const Transaction::TransitionAdds& transactions) {
|
|||
|
||||
// Remove pre-existing transition, if need be
|
||||
if (!TransitionStage::isIndexInvalid(transitionId)) {
|
||||
resetItemTransition(itemId);
|
||||
// Only remove if:
|
||||
// transitioning to something other than none or we're transitioning to none from ELEMENT_LEAVE_DOMAIN or USER_LEAVE_DOMAIN
|
||||
const auto& oldTransitionType = transitionStage->getTransition(transitionId).eventType;
|
||||
if (transitionType != Transition::NONE || !(oldTransitionType == Transition::ELEMENT_LEAVE_DOMAIN || oldTransitionType == Transition::USER_LEAVE_DOMAIN)) {
|
||||
resetItemTransition(itemId);
|
||||
}
|
||||
}
|
||||
|
||||
// Add a new one.
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
// This next call are NOT threadsafe, you have to call them from the correct thread to avoid any potential issues
|
||||
|
||||
// Access a particular item form its ID
|
||||
// Access a particular item from its ID
|
||||
// WARNING, There is No check on the validity of the ID, so this could return a bad Item
|
||||
const Item& getItem(const ItemID& id) const { return _items[id]; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue