diff pytouhou/game/player.py @ 386:dc6ed7b1c6de

Cancel player lasers when she dies.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 20 Oct 2012 20:44:12 +0200
parents 690b5faaa0e6
children ac2891afb0bb
line wrap: on
line diff
--- a/pytouhou/game/player.py
+++ b/pytouhou/game/player.py
@@ -232,6 +232,9 @@ class Player(object):
                     self.state.power -= 16
                 else:
                     self.state.power = 0
+                for laser in self._game.players_lasers:
+                    if laser:
+                        laser.cancel()
 
                 self.state.lives -= 1
                 if self.state.lives < 0: