diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/sprite.cpp | 4 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 83f92ce2bc..d2e1e494e3 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -269,8 +269,8 @@ int Sprite::get_frame() const { } void Sprite::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)); } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a9dacc442c..aec672d2c7 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -593,8 +593,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)); } |