Skip to content

Commit

Permalink
add 3.x compatibility for animation loop mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Owl-A committed Jul 10, 2023
1 parent 4438206 commit 1686a7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scene/resources/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
} else {
return false;
}
#ifndef DISABLE_DEPRECATED
} else if (prop_name == "loop" && p_value.operator bool()) { // Compatibility with Godot 3.x.
loop_mode = Animation::LoopMode::LOOP_LINEAR;
return true;
#endif // DISABLE_DEPRECATED
} else {
return false;
}
Expand Down

0 comments on commit 1686a7a

Please sign in to comment.