From: adrianna Date: Sat, 5 Mar 2016 22:13:34 +0000 (+0200) Subject: uninterrupted murder X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=60f5cbeec5d348b843fca045a9af04432eaeafb2;p=koperkapel.git uninterrupted murder --- diff --git a/koperkapel/scenes/level.py b/koperkapel/scenes/level.py index 0aaa33d..66eccf0 100644 --- a/koperkapel/scenes/level.py +++ b/koperkapel/scenes/level.py @@ -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