Updated libstormgames. Fixed death sounds following player. Fixed volume keys in survival mode.

This commit is contained in:
Storm Dragon
2025-09-08 16:00:13 -04:00
parent 04067a4bb3
commit 2437e13604
5 changed files with 71 additions and 5 deletions

View File

@@ -257,10 +257,10 @@ class Enemy(Object):
# Award points
self.level.levelScore += totalPoints
# Play death sound if available using positional audio
deathSound = f"{self.enemyType}_dies"
if deathSound in self.sounds:
self.channel = obj_play(self.sounds, deathSound, self.level.player.xPos, self.xPos, loop=False)
# Create a DeathSound object to play death sound at fixed position
from src.death_sound import DeathSound
deathSoundObj = DeathSound(self.xPos, self.yPos, self.enemyType, self.sounds)
self.level.objects.append(deathSoundObj)
# Handle witch-specific drops
if self.enemyType == "witch":