diff --git a/libstormgames b/libstormgames index 2f791da..e7d5b03 160000 --- a/libstormgames +++ b/libstormgames @@ -1 +1 @@ -Subproject commit 2f791da5b75c34070987ddf3a4bdbb4ea0eac785 +Subproject commit e7d5b03e554501fc49b077468e1b09200dad4c41 diff --git a/src/catapult.py b/src/catapult.py index 86910ad..69aea38 100644 --- a/src/catapult.py +++ b/src/catapult.py @@ -75,21 +75,21 @@ class Catapult(Object): def fire(self, currentTime, player): """Start the firing sequence""" self.lastFireTime = currentTime - - # Play launch sound - play_sound(self.sounds['catapult_launch']) - + + # Play launch sound using directional audio + play_directional_sound(self.sounds, 'catapult_launch', player.xPos, self.xPos) + # Set up pending pumpkin isHigh = random.choice([True, False]) fireDirection = 1 if player.xPos > self.xPos else -1 - + # Store pumpkin data for later creation self.pendingPumpkin = { 'isHigh': isHigh, 'direction': fireDirection, 'playerMaxHealth': player.get_max_health() } - + # Set when to actually launch the pumpkin self.pumpkinLaunchTime = currentTime + self.launchDelay