diff options
| author | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
|---|---|---|
| committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
| commit | 29caf2bb5be061cd1ab014cf938f2c71d0bd2663 (patch) | |
| tree | 859a0c3d2805198672c1e22d4780c3eb68f55a57 /scene/2d/animated_sprite.cpp | |
| parent | c5f574b914b3cb11d97ae616df4a0bced45bb17c (diff) | |
| parent | 79e5ced7e668fa53567ac6aaf5a26393cea6c9a2 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'scene/2d/animated_sprite.cpp')
| -rw-r--r-- | scene/2d/animated_sprite.cpp | 5 |
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) |