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
This commit is contained in:
helixhorned 2012-01-10 23:44:09 +00:00
parent 6a37636bb0
commit a0d27ee702

View file

@ -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