couple of syntax bug fixes

This commit is contained in:
Jason Persampieri 2004-12-12 20:51:39 +00:00
parent 5d6227f1c6
commit ad9d422180

View File

@ -14,7 +14,7 @@ class Audio3DManager:
# sound is an AudioSound
# object is any Panda object with coordinates
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
return 0
@ -27,9 +27,9 @@ class Audio3DManager:
def detachSound(self, sound):
for known_object in self.sound_dict.keys():
if sound_dict[known_object].count(sound):
self.sound_dict[known_object].remove()
if len(sound_dict[known_object]) == 0:
if self.sound_dict[known_object].count(sound):
self.sound_dict[known_object].remove(sound)
if len(self.sound_dict[known_object]) == 0:
# if there are no other sounds, don't track
# the object any more
del self.sound_dict[known_object]