mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
couple of syntax bug fixes
This commit is contained in:
parent
5d6227f1c6
commit
ad9d422180
@ -14,7 +14,7 @@ class Audio3DManager:
|
|||||||
# sound is an AudioSound
|
# sound is an AudioSound
|
||||||
# object is any Panda object with coordinates
|
# object is any Panda object with coordinates
|
||||||
for known_object in self.sound_dict.keys():
|
for known_object in self.sound_dict.keys():
|
||||||
if sound_dict[known_object].count(sound):
|
if self.sound_dict[known_object].count(sound):
|
||||||
# This sound is already attached to something
|
# This sound is already attached to something
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@ -27,9 +27,9 @@ class Audio3DManager:
|
|||||||
|
|
||||||
def detachSound(self, sound):
|
def detachSound(self, sound):
|
||||||
for known_object in self.sound_dict.keys():
|
for known_object in self.sound_dict.keys():
|
||||||
if sound_dict[known_object].count(sound):
|
if self.sound_dict[known_object].count(sound):
|
||||||
self.sound_dict[known_object].remove()
|
self.sound_dict[known_object].remove(sound)
|
||||||
if len(sound_dict[known_object]) == 0:
|
if len(self.sound_dict[known_object]) == 0:
|
||||||
# if there are no other sounds, don't track
|
# if there are no other sounds, don't track
|
||||||
# the object any more
|
# the object any more
|
||||||
del self.sound_dict[known_object]
|
del self.sound_dict[known_object]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user