Bugfix: make RANDOM_ANIM end on a neutral frame

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3315 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-11-18 00:07:33 +00:00
parent c7873c49e0
commit 963a6fb808
+6 -1
View File
@@ -183,6 +183,10 @@ AdvanceAmbientSequence (SEQUENCE *pSeq)
{ // animation ended
active = FALSE;
pSeq->Alarm = randomRestartRate (pSeq) + 1;
// RANDOM_ANIM must end on a neutral frame
if (ADPtr->AnimFlags & RANDOM_ANIM)
pSeq->NextIndex = 0;
}
// Will draw the next frame or change to next colormap
@@ -452,7 +456,8 @@ ambient_anim_task (void *data)
}
else if (ActiveMask & ADPtr->BlockMask)
{ // animation is blocked
assert (!(ActiveMask & ActiveBit));
assert (!(ActiveMask & ActiveBit) &&
"Check animations' mutual blocking masks");
assert (animAtNeutralIndex (pSeq));
// reschedule
pSeq->Alarm = randomRestartRate (pSeq) + 1;