mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
made __init__ a little more flexible
This commit is contained in:
parent
674520f630
commit
8176ae9423
@ -33,7 +33,7 @@ class SoundInterval(Interval.Interval):
|
||||
self.startTime = startTime
|
||||
self.node = node
|
||||
# If no duration given use sound's duration as interval's duration
|
||||
if duration == 0.0 and self.sound != None:
|
||||
if float(duration) == 0.0 and self.sound != None:
|
||||
duration = max(self.sound.length() - self.startTime, 0)
|
||||
if (duration == 0):
|
||||
self.notify.warning('zero length duration!')
|
||||
|
Loading…
x
Reference in New Issue
Block a user