mirror of
https://github.com/godotengine/godot.git
synced 2025-04-01 00:41:35 +08:00
Fix uninitialized data in Sprite::_get_rects()
(cherry picked from commit 5f917139ab4050b9e03edff71ceeb5cff7abd386)
This commit is contained in:
parent
683511310e
commit
73cc3a96c0
@ -63,8 +63,8 @@ void Sprite::_get_rects(Rect2 &r_src_rect, Rect2 &r_dst_rect, bool &r_filter_cli
|
||||
s = s / Size2(hframes, vframes);
|
||||
|
||||
r_src_rect.size = s;
|
||||
r_src_rect.position.x += float(frame % hframes) * s.x;
|
||||
r_src_rect.position.y += float(frame / hframes) * s.y;
|
||||
r_src_rect.position.x = float(frame % hframes) * s.x;
|
||||
r_src_rect.position.y = float(frame / hframes) * s.y;
|
||||
}
|
||||
|
||||
Point2 ofs = offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user