mirror of
https://github.com/godotengine/godot
synced 2024-09-04 21:48:31 +00:00
Fix not being able to stop() empty Tweens
This commit is contained in:
parent
bb1f55c387
commit
4f5c3d5a60
|
@ -249,8 +249,6 @@ bool Tween::custom_step(float p_delta) {
|
|||
}
|
||||
|
||||
bool Tween::step(float p_delta) {
|
||||
ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners.");
|
||||
|
||||
if (dead) {
|
||||
return false;
|
||||
}
|
||||
|
@ -271,6 +269,7 @@ bool Tween::step(float p_delta) {
|
|||
}
|
||||
|
||||
if (!started) {
|
||||
ERR_FAIL_COND_V_MSG(tweeners.is_empty(), false, "Tween started, but has no Tweeners.");
|
||||
current_step = 0;
|
||||
loops_done = 0;
|
||||
start_tweeners();
|
||||
|
|
Loading…
Reference in a new issue