mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-03 14:45:57 +01:00
Fix animation signal caches_cleared firing timing
(cherry picked from commit 962b6a3e8f9d91f92f2547e2da6ba8dbd5a661dc)
This commit is contained in:
parent
8be8577da6
commit
c8a090fa42
@ -1471,7 +1471,6 @@ float AnimationPlayer::get_current_animation_length() const {
|
|||||||
|
|
||||||
void AnimationPlayer::_animation_changed() {
|
void AnimationPlayer::_animation_changed() {
|
||||||
clear_caches();
|
clear_caches();
|
||||||
emit_signal("caches_cleared");
|
|
||||||
if (is_playing()) {
|
if (is_playing()) {
|
||||||
playback.seeked = true; //need to restart stuff, like audio
|
playback.seeked = true; //need to restart stuff, like audio
|
||||||
}
|
}
|
||||||
@ -1510,6 +1509,8 @@ void AnimationPlayer::clear_caches() {
|
|||||||
cache_update_size = 0;
|
cache_update_size = 0;
|
||||||
cache_update_prop_size = 0;
|
cache_update_prop_size = 0;
|
||||||
cache_update_bezier_size = 0;
|
cache_update_bezier_size = 0;
|
||||||
|
|
||||||
|
emit_signal("caches_cleared");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationPlayer::set_active(bool p_active) {
|
void AnimationPlayer::set_active(bool p_active) {
|
||||||
|
@ -828,7 +828,6 @@ void AnimationTree::_clear_caches() {
|
|||||||
memdelete(track_cache[*K]);
|
memdelete(track_cache[*K]);
|
||||||
}
|
}
|
||||||
playing_caches.clear();
|
playing_caches.clear();
|
||||||
|
|
||||||
track_cache.clear();
|
track_cache.clear();
|
||||||
cache_valid = false;
|
cache_valid = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user