summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/sprite.cpp4
-rw-r--r--scene/main/scene_tree.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 796969be1e..0dd02a982c 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -73,8 +73,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;
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 136fd4cfd1..12c3da78bd 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -615,6 +615,8 @@ void SceneTree::_notification(int p_notification) {
}
} break;
case NOTIFICATION_OS_MEMORY_WARNING:
+ case NOTIFICATION_WM_MOUSE_ENTER:
+ case NOTIFICATION_WM_MOUSE_EXIT:
case NOTIFICATION_WM_FOCUS_IN:
case NOTIFICATION_WM_FOCUS_OUT: {