Over corrected and broke music.
This commit is contained in:
@@ -58,11 +58,18 @@ class Level:
|
|||||||
ambientFile = levelData["ambience"]
|
ambientFile = levelData["ambience"]
|
||||||
|
|
||||||
# Build list of paths to try (pack-specific first, then generic)
|
# Build list of paths to try (pack-specific first, then generic)
|
||||||
|
# Include both PyInstaller-aware absolute paths and relative paths for compatibility
|
||||||
ambiencePaths = []
|
ambiencePaths = []
|
||||||
soundsDir = get_sounds_directory_path()
|
soundsDir = get_sounds_directory_path()
|
||||||
if self.levelPackName:
|
if self.levelPackName:
|
||||||
|
# PyInstaller-aware absolute path
|
||||||
ambiencePaths.append(os.path.join(soundsDir, self.levelPackName, "ambience", ambientFile))
|
ambiencePaths.append(os.path.join(soundsDir, self.levelPackName, "ambience", ambientFile))
|
||||||
|
# Original relative path (for compatibility)
|
||||||
|
ambiencePaths.append(f"sounds/{self.levelPackName}/ambience/{ambientFile}")
|
||||||
|
# PyInstaller-aware absolute path
|
||||||
ambiencePaths.append(os.path.join(soundsDir, "ambience", ambientFile))
|
ambiencePaths.append(os.path.join(soundsDir, "ambience", ambientFile))
|
||||||
|
# Original relative path (for compatibility)
|
||||||
|
ambiencePaths.append(f"sounds/ambience/{ambientFile}")
|
||||||
|
|
||||||
# Try each path until one works
|
# Try each path until one works
|
||||||
for ambiencePath in ambiencePaths:
|
for ambiencePath in ambiencePaths:
|
||||||
|
|||||||
Reference in New Issue
Block a user