about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-06-24 12:12:21 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-06-28 10:31:04 +0700
commit3507a52ac720afc7c22a1354033e65b4df64faae (patch)
treef10e7cc9804fbb7682bcd45c0968e45541fa72d9
parente7d04930b32f5c8a066091cce6e4e9b494c821d3 (diff)
downloadbrutalmaze-3507a52ac720afc7c22a1354033e65b4df64faae.tar.gz
Fix enemy spawning sound position
-rw-r--r--brutalmaze/game.py3
-rw-r--r--brutalmaze/maze.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/brutalmaze/game.py b/brutalmaze/game.py
index f78c6f0..6295ae1 100644
--- a/brutalmaze/game.py
+++ b/brutalmaze/game.py
@@ -118,7 +118,6 @@ class Game:
             pygame.mixer.music.play(-1)
         pygame.display.set_icon(ICON)
 
-        pygame.fastevent.init()
         if config.server:
             self.server = socket()
             self.server.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
@@ -186,7 +185,7 @@ class Game:
 
         Return False if QUIT event is captured, True otherwise.
         """
-        events = pygame.fastevent.get()
+        events = pygame.event.get()
         for event in events:
             if event.type == QUIT:
                 return False
diff --git a/brutalmaze/maze.py b/brutalmaze/maze.py
index 3dd1a4f..c6f2585 100644
--- a/brutalmaze/maze.py
+++ b/brutalmaze/maze.py
@@ -289,7 +289,7 @@ class Maze:
                     self.map[gridx][gridy] = ENEMY
                     play(self.sfx_spawn,
                          1 - enemy.get_distance()/self.get_distance(0, 0)/2,
-                         enemy.get_angle() + pi)
+                         enemy.get_angle())
                     enemy.hit(wound)
                     self.enemies.append(enemy)
                     fallen.append(i)