diff --git a/libstormgames.py b/libstormgames.py index 82d82ad..dcdd3f6 100755 --- a/libstormgames.py +++ b/libstormgames.py @@ -179,8 +179,8 @@ def obj_play(sounds, soundName, playerPos, objPos): return None distance = playerPos - objPos angle = math.radians(distance * 5) - left = math.sqrt(2)/2.0 * (math.cos(angle) - math.sin(angle)) - right = math.sqrt(2)/2.0 * (math.cos(angle) + math.sin(angle)) + left = math.sqrt(2)/2.0 * (math.cos(angle) + math.sin(angle)) + right = math.sqrt(2)/2.0 * (math.cos(angle) - math.sin(angle)) if left < 0: left *= -1 if right < 0: @@ -199,8 +199,8 @@ def obj_update(x, playerPos, objPos): return None distance = playerPos - objPos angle = math.radians(distance * 5) - left = math.sqrt(2)/2.0 * (math.cos(angle) - math.sin(angle)) - right = math.sqrt(2)/2.0 * (math.cos(angle) + math.sin(angle)) + left = math.sqrt(2)/2.0 * (math.cos(angle) + math.sin(angle)) + right = math.sqrt(2)/2.0 * (math.cos(angle) - math.sin(angle)) if left < 0: left *= -1 if right < 0: @@ -318,6 +318,7 @@ def learn_sounds(sounds): def game_menu(sounds, *options): loop = True + pygame.mixer.stop() if pygame.mixer.music.get_busy(): pygame.mixer.music.unpause() else: