Clear seeked/started flag after seeking/advancing in AnimationPlayer
This commit is contained in:
parent
80de898d72
commit
9c3104292d
|
@ -534,12 +534,19 @@ void AnimationPlayer::seek(double p_time, bool p_update, bool p_update_only) {
|
|||
}
|
||||
}
|
||||
|
||||
playback.started = false; // Start has already gone by seeking, delta does not need to be 0 in the internal process.
|
||||
playback.seeked = true;
|
||||
if (p_update) {
|
||||
_process_animation(0, p_update_only);
|
||||
playback.seeked = false; // If animation was proceeded here, no more seek in internal process.
|
||||
}
|
||||
}
|
||||
|
||||
void AnimationPlayer::advance(double p_time) {
|
||||
playback.started = false; // Start has already gone by advancing, delta does not need to be 0 in the internal process.
|
||||
AnimationMixer::advance(p_time);
|
||||
}
|
||||
|
||||
bool AnimationPlayer::is_valid() const {
|
||||
return (playback.current.from);
|
||||
}
|
||||
|
|
|
@ -183,6 +183,8 @@ public:
|
|||
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
|
||||
|
||||
virtual void advance(double p_time) override;
|
||||
|
||||
AnimationPlayer();
|
||||
~AnimationPlayer();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue