summaryrefslogtreecommitdiff
path: root/scene/resources/sprite_frames.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-08-09 23:02:43 +0200
committerGitHub <noreply@github.com>2021-08-09 23:02:43 +0200
commit7bcfc66fb4253fb121008809e4e81c5b704776b7 (patch)
tree770bb6c7c266c5266f4de3ceab52e756b55bf440 /scene/resources/sprite_frames.cpp
parent9d9161c71956201875334b6a2a9ca37a7d5d3970 (diff)
parent84f720966c74d5b37f70e21867e9e3e6a1e44c36 (diff)
Merge pull request #51294 from aaronfranke/double-time
Diffstat (limited to 'scene/resources/sprite_frames.cpp')
-rw-r--r--scene/resources/sprite_frames.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp
index e9adf67559..140c6f821f 100644
--- a/scene/resources/sprite_frames.cpp
+++ b/scene/resources/sprite_frames.cpp
@@ -122,14 +122,14 @@ Vector<String> SpriteFrames::get_animation_names() const {
return names;
}
-void SpriteFrames::set_animation_speed(const StringName &p_anim, float p_fps) {
+void SpriteFrames::set_animation_speed(const StringName &p_anim, double p_fps) {
ERR_FAIL_COND_MSG(p_fps < 0, "Animation speed cannot be negative (" + itos(p_fps) + ").");
Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_MSG(!E, "Animation '" + String(p_anim) + "' doesn't exist.");
E->get().speed = p_fps;
}
-float SpriteFrames::get_animation_speed(const StringName &p_anim) const {
+double SpriteFrames::get_animation_speed(const StringName &p_anim) const {
const Map<StringName, Anim>::Element *E = animations.find(p_anim);
ERR_FAIL_COND_V_MSG(!E, 0, "Animation '" + String(p_anim) + "' doesn't exist.");
return E->get().speed;