summaryrefslogtreecommitdiff
path: root/scene/2d/animated_sprite_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/animated_sprite_2d.cpp')
-rw-r--r--scene/2d/animated_sprite_2d.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 96a3134691..fad4784d51 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -94,7 +94,7 @@ Rect2 AnimatedSprite2D::_get_rect() const {
Point2 ofs = offset;
if (centered) {
- ofs -= Size2(s) / 2;
+ ofs -= s / 2;
}
if (s == Size2(0, 0)) {
@@ -228,8 +228,7 @@ void AnimatedSprite2D::_notification(int p_what) {
RID ci = get_canvas_item();
- Size2i s;
- s = texture->get_size();
+ Size2 s = texture->get_size();
Point2 ofs = offset;
if (centered) {
ofs -= s / 2;