diff options
| author | Andreas Haas | 2017-04-09 01:15:37 +0200 |
|---|---|---|
| committer | Andreas Haas | 2017-04-09 01:16:48 +0200 |
| commit | 9b6b713d61fa18c48d80b647e2f20d1f8bf8b9fa (patch) | |
| tree | 3499c06536407a2a6eff57496acaf88408dc4b1f /scene/2d/particles_2d.cpp | |
| parent | c9eb0f5f4518e5edd2d867e5ff002c61484cd3c8 (diff) | |
| download | godot-9b6b713d61fa18c48d80b647e2f20d1f8bf8b9fa.tar.gz godot-9b6b713d61fa18c48d80b647e2f20d1f8bf8b9fa.tar.zst godot-9b6b713d61fa18c48d80b647e2f20d1f8bf8b9fa.zip | |
Particles2D: Fix flip property (again).
should have flipped the dst_rect..
Diffstat (limited to '')
| -rw-r--r-- | scene/2d/particles_2d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index 5750ddc6e..8416863e8 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -583,13 +583,13 @@ void Particles2D::_notification(int p_what) { src_rect.pos.x = size.x * (frame % h_frames); src_rect.pos.y = size.y * (frame / h_frames); } - + Rect2 dst_rect(Point2(), size); if (flip_h) - src_rect.size.x = -src_rect.size.x; + dst_rect.size.x = -dst_rect.size.x; if (flip_v) - src_rect.size.y = -src_rect.size.y; + dst_rect.size.y = -dst_rect.size.y; - texture->draw_rect_region(ci, Rect2(Point2(), size), src_rect, color); + texture->draw_rect_region(ci, dst_rect, src_rect, color); //VisualServer::get_singleton()->canvas_item_add_texture_rect(ci,r,texrid,false,color); } else { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(), size), color); |
