mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -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.startTime = startTime
|
||||||
self.node = node
|
self.node = node
|
||||||
# If no duration given use sound's duration as interval's duration
|
# 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)
|
duration = max(self.sound.length() - self.startTime, 0)
|
||||||
if (duration == 0):
|
if (duration == 0):
|
||||||
self.notify.warning('zero length duration!')
|
self.notify.warning('zero length duration!')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user