mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Or rather, replaceMatchingPriorities.
This commit is contained in:
parent
09ba25bde5
commit
4d6e8a2c9e
2 changed files with 4 additions and 4 deletions
|
@ -1696,7 +1696,7 @@ void AnimationHandle::setPriority(float priority) {
|
|||
if (_running) {
|
||||
_model->_runningAnimations.removeOne(_self);
|
||||
if (priority < _priority) {
|
||||
lowerPriority(priority);
|
||||
replaceMatchingPriorities(priority);
|
||||
}
|
||||
_priority = priority;
|
||||
insertSorted(_model->_runningAnimations, _self);
|
||||
|
@ -1733,7 +1733,7 @@ void AnimationHandle::setRunning(bool running) {
|
|||
|
||||
} else {
|
||||
_model->_runningAnimations.removeOne(_self);
|
||||
lowerPriority(0.0f);
|
||||
replaceMatchingPriorities(0.0f);
|
||||
}
|
||||
emit runningChanged(_running);
|
||||
}
|
||||
|
@ -1819,7 +1819,7 @@ void AnimationHandle::simulate(float deltaTime) {
|
|||
}
|
||||
}
|
||||
|
||||
void AnimationHandle::lowerPriority(float newPriority) {
|
||||
void AnimationHandle::replaceMatchingPriorities(float newPriority) {
|
||||
for (int i = 0; i < _jointMappings.size(); i++) {
|
||||
int mapping = _jointMappings.at(i);
|
||||
if (mapping != -1) {
|
||||
|
|
|
@ -430,7 +430,7 @@ private:
|
|||
AnimationHandle(Model* model);
|
||||
|
||||
void simulate(float deltaTime);
|
||||
void lowerPriority(float newPriority);
|
||||
void replaceMatchingPriorities(float newPriority);
|
||||
|
||||
Model* _model;
|
||||
WeakAnimationHandlePointer _self;
|
||||
|
|
Loading…
Reference in a new issue