allow intervals with duration < 0

This commit is contained in:
David Rose 2003-09-30 17:16:27 +00:00
parent 87636fa232
commit dea5eaccfb
2 changed files with 2 additions and 5 deletions

View File

@ -19,7 +19,7 @@ class Interval(DirectObject):
"""__init__(name, duration, openEnded)
"""
self.name = name
self.duration = duration
self.duration = max(duration, 0.0)
self.state = CInterval.SInitial
self.currT = 0.0
self.doneEvent = None
@ -37,8 +37,6 @@ class Interval(DirectObject):
# if it should be ignored in this case.
self.openEnded = openEnded
assert(self.duration >= 0)
def getName(self):
return self.name

View File

@ -36,7 +36,7 @@ CInterval(const string &name, double duration, bool open_ended) :
_state(S_initial),
_curr_t(0.0),
_name(name),
_duration(duration),
_duration(max(duration, 0.0)),
_open_ended(open_ended),
_dirty(false)
{
@ -53,7 +53,6 @@ CInterval(const string &name, double duration, bool open_ended) :
_play_rate = 1.0;
_do_loop = false;
_loop_count = 0;
nassertv(_duration >= 0.0);
}
////////////////////////////////////////////////////////////////////