1
Fork 0

stop bug where multiple sounds play

This commit is contained in:
Jake Howard 2015-05-12 22:48:41 +01:00
parent 0d4580c854
commit cb82deed7b
1 changed files with 4 additions and 3 deletions

View File

@ -80,9 +80,10 @@ def play(window, options):
bullet_group.add(temp)
if event.type == pygame.KEYDOWN and event.key == pygame.K_KP_PLUS:
player.OP = True
if not player.options["Sounds"] or not player.OP:
Sounds["main"].stop()
Sounds["OP"].play(loops=-1)
player.OP = True
keys = pygame.key.get_pressed()
if keys[pygame.K_RIGHT] or keys[pygame.K_d]: