From 1b04e361d656640fa4b913b55295969a4438fa37 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Thu, 11 Dec 2003 23:13:27 +0000 Subject: [PATCH] AmbientSound plays on creation, can move it in the editor --- direct/src/level/AmbientSound.py | 2 ++ direct/src/level/EntityTypes.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/level/AmbientSound.py b/direct/src/level/AmbientSound.py index a59a95ed27..8f6f1d1136 100755 --- a/direct/src/level/AmbientSound.py +++ b/direct/src/level/AmbientSound.py @@ -4,8 +4,10 @@ import BasicEntities class AmbientSound(BasicEntities.NodePathEntity): def __init__(self, level, entId): BasicEntities.NodePathEntity.__init__(self, level, entId) + self.initSound() def destroy(self): + self.destroySound() BasicEntities.NodePathEntity.destroy(self) def initSound(self): diff --git a/direct/src/level/EntityTypes.py b/direct/src/level/EntityTypes.py index 89a525c7aa..5f006d62af 100755 --- a/direct/src/level/EntityTypes.py +++ b/direct/src/level/EntityTypes.py @@ -119,7 +119,7 @@ class VisibilityExtender(Entity): ('newZones', [], 'visZoneList'), ) -class AmbientSound(Entity): +class AmbientSound(Nodepath): type = 'ambientSound' attribs = ( ('soundPath', '', 'bamfilename'),