From 4d37f8fe6d4bbdd4da9dc03021294521c1ce2dce Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 14 Nov 2003 09:48:01 +0000 Subject: [PATCH] make negative playRate implicitly play animation backwards --- direct/src/interval/ActorInterval.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/direct/src/interval/ActorInterval.py b/direct/src/interval/ActorInterval.py index 83057a5053..0d22fbcc84 100644 --- a/direct/src/interval/ActorInterval.py +++ b/direct/src/interval/ActorInterval.py @@ -89,8 +89,10 @@ class ActorInterval(Interval.Interval): maxFrames = max(maxFrames, numFrames) self.endFrame = maxFrames - 1 - # Must we play the animation backwards? - self.reverse = 0 + # Must we play the animation backwards? We play backwards if + # either (or both) of the following is true: the playRate is + # negative, or endFrame is before startFrame. + self.reverse = (playRate < 0) if self.endFrame < self.startFrame: self.reverse = 1 t = self.endFrame