mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
allow intervals with duration < 0
This commit is contained in:
parent
87636fa232
commit
dea5eaccfb
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user