Browse Source

couple of syntax bug fixes

Jason Persampieri 21 years ago
parent
commit
ad9d422180
1 changed files with 4 additions and 4 deletions
  1. 4 4
      direct/src/showbase/Audio3DManager.py

+ 4 - 4
direct/src/showbase/Audio3DManager.py

@@ -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):
-                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
                     # 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]