mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +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:
|
protected:
|
||||||
PayloadPointer _payload;
|
PayloadPointer _payload;
|
||||||
ItemKey _key;
|
ItemKey _key;
|
||||||
ItemCell _cell{ INVALID_CELL };
|
ItemCell _cell { INVALID_CELL };
|
||||||
Index _transitionId{ INVALID_INDEX };
|
Index _transitionId { INVALID_INDEX };
|
||||||
|
|
||||||
friend class Scene;
|
friend class Scene;
|
||||||
};
|
};
|
||||||
|
|
|
@ -391,7 +391,12 @@ void Scene::transitionItems(const Transaction::TransitionAdds& transactions) {
|
||||||
|
|
||||||
// Remove pre-existing transition, if need be
|
// Remove pre-existing transition, if need be
|
||||||
if (!TransitionStage::isIndexInvalid(transitionId)) {
|
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.
|
// 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
|
// 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
|
// 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]; }
|
const Item& getItem(const ItemID& id) const { return _items[id]; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue