diff --git a/direct/src/interval/Interval.py b/direct/src/interval/Interval.py index a22b72170b..c55b48bfd6 100644 --- a/direct/src/interval/Interval.py +++ b/direct/src/interval/Interval.py @@ -58,7 +58,11 @@ class Interval(DirectObject): self.getState() == CInterval.SFinal) def setT(self, t): - t = min(max(t, 0.0), self.getDuration()) + # There doesn't seem to be any reason to clamp this, and it + # breaks looping intervals. The interval code should properly + # handle t values outside the proper range. + #t = min(max(t, 0.0), self.getDuration()) + state = self.getState() if state == CInterval.SInitial: self.privInitialize(t) diff --git a/direct/src/interval/cInterval.cxx b/direct/src/interval/cInterval.cxx index 12bf5f73a8..ca213bd707 100644 --- a/direct/src/interval/cInterval.cxx +++ b/direct/src/interval/cInterval.cxx @@ -66,7 +66,11 @@ CInterval(const string &name, double duration, bool open_ended) : //////////////////////////////////////////////////////////////////// void CInterval:: set_t(double t) { - t = min(max(t, 0.0), get_duration()); + // There doesn't seem to be any reason to clamp this, and it + // breaks looping intervals. The interval code should properly + // handle t values outside the proper range. + //t = min(max(t, 0.0), get_duration()); + switch (get_state()) { case S_initial: priv_initialize(t);