X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftoons.c;h=a45720be956da67a4aa81847c1b931376cd485d1;hb=92204d79d159df0be4bd05c4b4e4dabbcaefe805;hp=8ecc0d5d6672b1a1181fc4fab9f279763bcaba35;hpb=c5ee7e4524f10322894b2547337e4c973a80a552;p=rocksndiamonds.git diff --git a/src/libgame/toons.c b/src/libgame/toons.c index 8ecc0d5d..a45720be 100644 --- a/src/libgame/toons.c +++ b/src/libgame/toons.c @@ -64,7 +64,10 @@ int getAnimationFrame(int num_frames, int delay, int mode, int start_frame, { /* note: expect different frames for the same delay cycle! */ - frame = anim.simple_random_value % num_frames; + if (anim.random_frame < 0) + frame = SimpleRND(num_frames); + else + frame = anim.random_frame % num_frames; } if (mode & ANIM_REVERSE) /* use reverse animation direction */