uninterrupted murder
authoradrianna <adrianna.pinska@gmail.com>
Sat, 5 Mar 2016 22:13:34 +0000 (00:13 +0200)
committeradrianna <adrianna.pinska@gmail.com>
Sat, 5 Mar 2016 22:14:09 +0000 (00:14 +0200)
koperkapel/scenes/level.py

index 0aaa33d487dea765feeaa6776552fc26cefdfb3e..66eccf0ed167e77b655b106eb329ba20cf91812d 100644 (file)
@@ -363,8 +363,11 @@ class GameLevelScene(BaseLevelScene):
     def on_key_down(self, key, mod, unicode):
         x, y = self._player_pos
         if key in (keys.DOWN, keys.UP, keys.LEFT, keys.RIGHT):
+            firing = (keys.X in self._held_keys)
             self._held_keys.clear()
             self._held_keys.add(key)
+            if firing:
+                self._held_keys.add(keys.X)
             # We do this so pressing the key has an instant effect, and can
             # then be held
             self._last_key_down = self._key_rate + 0.01