diff --git a/wicked_quest.py b/wicked_quest.py index c1eb72f..faa12f6 100755 --- a/wicked_quest.py +++ b/wicked_quest.py @@ -445,10 +445,9 @@ class WickedQuest: # Game complete - use gameStartTime for total totalTime = pygame.time.get_ticks() - self.gameStartTime if self.player.xPos >= self.currentLevel.rightBoundary: - # Check for end of game scene - gamePath = get_game_dir_path(self.currentGame) + # Check for end of game scene using relative path like other sounds for ext in ['.wav', '.ogg', '.mp3']: - endFile = os.path.join(gamePath, f'end{ext}') + endFile = os.path.join("levels", self.currentGame, f'end{ext}') if os.path.exists(endFile): self.get_sounds()['end_scene'] = pygame.mixer.Sound(endFile) cut_scene(self.get_sounds(), 'end_scene')