diff options
| author | Andreas Haas | 2017-04-09 01:15:37 +0200 |
|---|---|---|
| committer | Andreas Haas | 2017-04-09 01:42:39 +0200 |
| commit | 6075dfe511728ab3fb59915a18ca99e5b8789d8b (patch) | |
| tree | 3e6776f846f831bf277cb69c2062ae15a27d69c4 | |
| parent | fce779a4ef02f1b14f95cab6a06e75db170f3448 (diff) | |
| download | godot-6075dfe511728ab3fb59915a18ca99e5b8789d8b.tar.gz godot-6075dfe511728ab3fb59915a18ca99e5b8789d8b.tar.zst godot-6075dfe511728ab3fb59915a18ca99e5b8789d8b.zip | |
Particles2D: Fix flip property (again).
should have flipped the dst_rect..
| -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 2d047f009..97b08113e 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -571,13 +571,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); |
