|
|
|
|
@ -73,7 +73,7 @@ float AnimationInfo::GetAnimationProgress() const
|
|
|
|
|
return fAnimationFraction; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AnimationInfo::SetNewAnimation(CelSprite *celSprite, int numberOfFrames, int ticksPerFrame, AnimationDistributionFlags flags /*= AnimationDistributionFlags::None*/, int numSkippedFrames /*= 0*/, int distributeFramesBeforeFrame /*= 0*/) |
|
|
|
|
void AnimationInfo::SetNewAnimation(const CelSprite *celSprite, int numberOfFrames, int ticksPerFrame, AnimationDistributionFlags flags /*= AnimationDistributionFlags::None*/, int numSkippedFrames /*= 0*/, int distributeFramesBeforeFrame /*= 0*/) |
|
|
|
|
{ |
|
|
|
|
if ((flags & AnimationDistributionFlags::RepeatedAction) == AnimationDistributionFlags::RepeatedAction && distributeFramesBeforeFrame != 0 && NumberOfFrames == numberOfFrames && CurrentFrame >= distributeFramesBeforeFrame && CurrentFrame != NumberOfFrames) { |
|
|
|
|
// We showed the same Animation (for example a melee attack) before but truncated the Animation.
|
|
|
|
|
@ -161,7 +161,7 @@ void AnimationInfo::SetNewAnimation(CelSprite *celSprite, int numberOfFrames, in
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void AnimationInfo::ChangeAnimationData(CelSprite *celSprite, int numberOfFrames, int delayLen) |
|
|
|
|
void AnimationInfo::ChangeAnimationData(const CelSprite *celSprite, int numberOfFrames, int delayLen) |
|
|
|
|
{ |
|
|
|
|
if (numberOfFrames != NumberOfFrames || delayLen != TicksPerFrame) { |
|
|
|
|
// Ensure that the CurrentFrame is still valid and that we disable ADL cause the calculcated values (for example TickModifier) could be wrong
|
|
|
|
|
|