mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
don't crash if localizing node goes away
This commit is contained in:
parent
b7c6b8105e
commit
6f52b6cf25
@ -33,8 +33,10 @@ class SfxPlayer:
|
|||||||
Get the volume that a sound should be played at if it is
|
Get the volume that a sound should be played at if it is
|
||||||
localized at this node. We compute this wrt the camera
|
localized at this node. We compute this wrt the camera
|
||||||
"""
|
"""
|
||||||
d = node.getDistance(base.cam)
|
d = None
|
||||||
if d > self.cutoffDistance:
|
if not node.isEmpty():
|
||||||
|
d = node.getDistance(base.cam)
|
||||||
|
if d == None or d > self.cutoffDistance:
|
||||||
volume = 0
|
volume = 0
|
||||||
else:
|
else:
|
||||||
if SfxPlayer.UseInverseSquare:
|
if SfxPlayer.UseInverseSquare:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user