X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fanim.c;h=3e2f1222ee1bc82b0ced39b0f20c0313cef0203a;hp=14dccc69c46d25a34764b0cbdbf7e18bd2354ad3;hb=cf41c74d18630924c1e32ad913d315a493402ef9;hpb=8b77194545721f4b8e3f80b59da8423ab2d90dae diff --git a/src/anim.c b/src/anim.c index 14dccc69..3e2f1222 100644 --- a/src/anim.c +++ b/src/anim.c @@ -242,6 +242,9 @@ int getAnimationFrame(int num_frames, int delay, int mode, int start_frame, { int frame = 0; + if (delay < 1) // delay must be at least 1 + delay = 1; + sync_frame += start_frame * delay; if (mode & ANIM_LOOP) // looping animation