mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Do not reset animation frame when restarting while we're fading out.
Keeps it smooth if we're oscillating on some theshold between running and not.)
This commit is contained in:
parent
08986dcb17
commit
a907c5757b
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@
|
|||
//
|
||||
|
||||
#include "AnimationHandle.h"
|
||||
|
||||
#include "AnimationLogging.h"
|
||||
|
||||
void AnimationHandle::setURL(const QUrl& url) {
|
||||
if (_url != url) {
|
||||
|
@ -51,8 +51,8 @@ void AnimationHandle::setMaskedJoints(const QStringList& maskedJoints) {
|
|||
}
|
||||
|
||||
void AnimationHandle::setRunning(bool running, bool doRestoreJoints) {
|
||||
if (running && isRunning()) {
|
||||
// if we're already running, this is the same as a restart
|
||||
if (running && isRunning() && (getFadePerSecond() >= 0.0f)) {
|
||||
// if we're already running, this is the same as a restart -- unless we're fading out.
|
||||
setFrameIndex(getFirstFrame());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue