changeset 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 d8aab27a2ab2
children e1f5dcd4b83e
files pytouhou/game/player.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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: