diff options
| author | Juan Linietsky | 2015-10-17 10:30:08 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-10-17 10:30:08 -0300 |
| commit | 63033aa646f7a49fbcecbc8cc30077cf268be10c (patch) | |
| tree | 80ccf1aed83e6c4d3ed1db2e1d2c0258090f7339 /scene/2d/animated_sprite.cpp | |
| parent | ab22203791489df160c36a29a3cd8aa8b32bec04 (diff) | |
| parent | 0d2b28377f1257af039c088f30c11aa0d12cc695 (diff) | |
| download | godot-63033aa646f7a49fbcecbc8cc30077cf268be10c.tar.gz godot-63033aa646f7a49fbcecbc8cc30077cf268be10c.tar.zst godot-63033aa646f7a49fbcecbc8cc30077cf268be10c.zip | |
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 0b00ac956..342b86b4c 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) |
