# HG changeset patch
# User Thibaut Girka <thib@sitedethib.com>
# Date 1341864907 -7200
# Node ID 7dc012f631dc37574d064e92b6e6e0f8c60485a2
# Parent  238d06c6603ea990f42d1aa598eb95cd031c7732
Fix Rumia on timeout

diff --git a/pytouhou/game/enemy.py b/pytouhou/game/enemy.py
--- a/pytouhou/game/enemy.py
+++ b/pytouhou/game/enemy.py
@@ -419,6 +419,7 @@ class Enemy(object):
             self.low_life_trigger = -1
             self.timeout_callback = -1
         elif self.timeout != -1 and self.frame == self.timeout:
+            self.frame = 0
             self.timeout = -1
             self._game.kill_enemies()
             self._game.cancel_bullets()
@@ -433,9 +434,7 @@ class Enemy(object):
             #TODO: this is only done under certain (unknown) conditions!
             # but it shouldn't hurt anyway, as the only option left is to crash!
             elif self.death_callback > -1:
-                self.process.switch_to_sub(self.death_callback)
-                self.timeout_callback = -1
-                self.death_callback = -1
+                self.life = 0 #TODO: do this next frame? Bypass self.touchable?
             else:
                 raise Exception('What the hell, man!')