Fixed item crazy sound mismatch. Updated instructions, probably not final version, but at least a place holder.

This commit is contained in:
Storm Dragon
2025-02-11 20:23:39 -05:00
parent 7f68af1958
commit 8530993fa9
3 changed files with 35 additions and 15 deletions

View File

@@ -231,14 +231,14 @@ class Level:
# Update bouncing items
for item in self.bouncing_items[:]: # Copy list to allow removal
if not item.update(currentTime):
if not item.update(currentTime, self.player.xPos):
self.bouncing_items.remove(item)
if not item.isActive:
speak(f"{item.soundName} got away!")
continue
# Check for item collection
if abs(item.xPos - self.player.xPos) < 1 and self.player.isJumping:
if abs(item._currentX - self.player.xPos) < 1 and self.player.isJumping:
play_sound(self.sounds[f'get_{item.soundName}'])
item.apply_effect(self.player)
item.isActive = False