mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
sfxplayer: fixes bug when using the "node argument" in SoundInterval, also fixes Py3 TypeError exception
Closes #640
This commit is contained in:
parent
204cbe4464
commit
d786709a49
@ -53,6 +53,8 @@ class SfxPlayer:
|
||||
d = node.getDistance(listenerNode)
|
||||
else:
|
||||
d = node.getDistance(base.cam)
|
||||
if not cutoff:
|
||||
cutoff = self.cutoffDistance
|
||||
if d == None or d > cutoff:
|
||||
volume = 0
|
||||
else:
|
||||
@ -70,9 +72,6 @@ class SfxPlayer:
|
||||
self, sfx, looping = 0, interrupt = 1, volume = None,
|
||||
time = 0.0, node=None, listenerNode = None, cutoff = None):
|
||||
if sfx:
|
||||
if not cutoff:
|
||||
cutoff = self.cutoffDistance
|
||||
|
||||
self.setFinalVolume(sfx, node, volume, listenerNode, cutoff)
|
||||
|
||||
# don't start over if it's already playing, unless
|
||||
|
Loading…
x
Reference in New Issue
Block a user