From a0d27ee7028ae6eb0f36bd5a3c24ad51b90b89bb Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 10 Jan 2012 23:44:09 +0000 Subject: [PATCH] animvpx sound: fix the 'may have many sounds per frame' requirement E.g. this should work correctly now: // FLY_BY, PIPEBOMB_EXPLODE, OCTA_DYING animsounds logo { 1 244 64 14 64 144 } git-svn-id: https://svn.eduke32.com/eduke32@2243 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/anim.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/source/anim.c b/polymer/eduke32/source/anim.c index 3bddf4476..ada2dfbe9 100644 --- a/polymer/eduke32/source/anim.c +++ b/polymer/eduke32/source/anim.c @@ -317,13 +317,10 @@ void G_PlayAnim(const char *fn,char t) // after rendering the frame but before displaying: maybe play sound... framenum++; - if (soundidx < numtotalsounds) + while (soundidx < numtotalsounds && anim_hi_sounds[animidx][2*soundidx] == framenum) { - if (anim_hi_sounds[animidx][2*soundidx] == framenum) - { - S_PlaySound(anim_hi_sounds[animidx][2*soundidx+1]); - soundidx++; - } + S_PlaySound(anim_hi_sounds[animidx][2*soundidx+1]); + soundidx++; } // this and showframe() instead of nextpage() are so that