diff --git a/data/brushes/inksplat.dat b/data/brushes/inksplat.dat index d1703d962..dc4ef478c 100644 --- a/data/brushes/inksplat.dat +++ b/data/brushes/inksplat.dat @@ -1,2 +1,3 @@ frames=5 +spacing=25 random diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index ca5b284e0..f75992e54 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -158,6 +158,8 @@ $Id$ * Other Improvements: ------------------- + * Random brushes avoid repeating the same frame twice. + * Showing a warning when using save-related options when "nosave" is set. (SourceForge Bug #3327493) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index b554d53f4..7f0b9eac0 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -5473,7 +5473,14 @@ static void blit_brush(int x, int y, int direction) brush_frame = 0; } else - brush_frame = rand() % abs(img_cur_brush_frames); + { + int old_brush_frame = brush_frame; + do + { + brush_frame = rand() % abs(img_cur_brush_frames); + } + while (brush_frame == old_brush_frame); + } dest.x = x; dest.y = y;