aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Roudiere2017-10-11 16:28:28 +0200
committerGitHub2017-10-11 16:28:28 +0200
commit409e58e67abde4e7af6e43b32c23338e119377fb (patch)
treeeebc9df2d5acc3f1a65c4cbef316997bfc30ef1a
parent740ef3dc9788d62fc07567149a3768e90af781ce (diff)
parent130ad806f8dd8e22537a8575ab8c779bafeba357 (diff)
downloadgodot-409e58e67abde4e7af6e43b32c23338e119377fb.tar.gz
godot-409e58e67abde4e7af6e43b32c23338e119377fb.tar.zst
godot-409e58e67abde4e7af6e43b32c23338e119377fb.zip
-rw-r--r--scene/2d/animated_sprite.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index c2edb173d..5982556c1 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -298,10 +298,8 @@ void AnimatedSprite::_validate_property(PropertyInfo &property) const {
property.hint = PROPERTY_HINT_SPRITE_FRAME;
- if (frames->has_animation(animation)) {
+ if (frames->has_animation(animation) && frames->get_frame_count(animation) > 1) {
property.hint_string = "0," + itos(frames->get_frame_count(animation) - 1) + ",1";
- } else {
- property.hint_string = "0,0,0";
}
}
}