diff options
Diffstat (limited to 'scene/3d/sprite_3d.cpp')
-rw-r--r-- | scene/3d/sprite_3d.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a9dacc442c..a8d2f4d415 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -577,9 +577,8 @@ void Sprite3D::set_frame(int p_frame) { ERR_FAIL_INDEX(p_frame, int64_t(vframes) * hframes); - if (frame != p_frame) + frame = p_frame; - frame = p_frame; _queue_update(); _change_notify("frame"); @@ -593,8 +592,8 @@ int Sprite3D::get_frame() const { } void Sprite3D::set_frame_coords(const Vector2 &p_coord) { - ERR_FAIL_INDEX(int(p_coord.x), vframes); - ERR_FAIL_INDEX(int(p_coord.y), hframes); + ERR_FAIL_INDEX(int(p_coord.x), hframes); + ERR_FAIL_INDEX(int(p_coord.y), vframes); set_frame(int(p_coord.y) * hframes + int(p_coord.x)); } |