diff options
Diffstat (limited to 'AnimationInterpolate.c')
| -rw-r--r-- | AnimationInterpolate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/AnimationInterpolate.c b/AnimationInterpolate.c index 44bdafc..a84b5a2 100644 --- a/AnimationInterpolate.c +++ b/AnimationInterpolate.c @@ -29,11 +29,11 @@ A_Interpolate(const Animation* anim, PixelRendererParams a) { return a.pixel; } - if (a.frame.current == in.startFrame) { + if (a.frame.current == a.frame.start) { memcpy(in.initialValueTemp, in.value, in.initialValueTempSize); } - double perc = (double)(a.frame.current - in.startFrame) / (in.endFrame - in.startFrame); + double perc = (double)(a.frame.current - a.frame.start) / (a.frame.end - a.frame.start); if (perc < 0.0) perc = 0.0; if (perc > 1.0) perc = 1.0; |
