summaryrefslogtreecommitdiffstats
path: root/scene/2d/animated_sprite.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-17 10:30:08 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-17 10:30:08 -0300
commit63033aa646f7a49fbcecbc8cc30077cf268be10c (patch)
tree80ccf1aed83e6c4d3ed1db2e1d2c0258090f7339 /scene/2d/animated_sprite.cpp
parentab22203791489df160c36a29a3cd8aa8b32bec04 (diff)
parent0d2b28377f1257af039c088f30c11aa0d12cc695 (diff)
downloadredot-engine-63033aa646f7a49fbcecbc8cc30077cf268be10c.tar.gz
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'scene/2d/animated_sprite.cpp')
-rw-r--r--scene/2d/animated_sprite.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 0b00ac9560..342b86b4c1 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -28,6 +28,8 @@
/*************************************************************************/
#include "animated_sprite.h"
#include "scene/scene_string_names.h"
+#include "os/os.h"
+
void AnimatedSprite::edit_set_pivot(const Point2& p_pivot) {
set_offset(p_pivot);
@@ -153,6 +155,9 @@ void AnimatedSprite::_notification(int p_what) {
if (centered)
ofs-=s/2;
+ if (OS::get_singleton()->get_use_pixel_snap()) {
+ ofs=ofs.floor();
+ }
Rect2 dst_rect(ofs,s);
if (hflip)