Sound file error hopefully fixed for pyinstaller.

This commit is contained in:
Storm Dragon
2025-09-13 01:33:16 -04:00
parent 82f1128087
commit 8218d28701
3 changed files with 26 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ from src.pack_sound_system import PackSoundSystem
from src.level import Level
from src.object import Object
from src.player import Player
from src.game_selection import select_game, get_level_path
from src.game_selection import select_game, get_level_path, get_game_dir_path
from src.save_manager import SaveManager
from src.survival_generator import SurvivalGenerator
@@ -446,7 +446,7 @@ class WickedQuest:
totalTime = pygame.time.get_ticks() - self.gameStartTime
if self.player.xPos >= self.currentLevel.rightBoundary:
# Check for end of game scene
gamePath = os.path.dirname(get_level_path(self.currentGame, 1))
gamePath = get_game_dir_path(self.currentGame)
for ext in ['.wav', '.ogg', '.mp3']:
endFile = os.path.join(gamePath, f'end{ext}')
if os.path.exists(endFile):