Mercurial > touhou
changeset 271:80e73b8245a4
Fix visibility handling
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 24 Jan 2012 00:56:31 +0100 |
parents | 7a9135b88853 |
children | b21acb12bed1 |
files | pytouhou/ui/gamerenderer.pyx pytouhou/vm/eclrunner.py |
diffstat | 2 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/ui/gamerenderer.pyx +++ b/pytouhou/ui/gamerenderer.pyx @@ -80,8 +80,8 @@ cdef class GameRenderer(Renderer): self.setup_camera(0, 0, 1) glDisable(GL_FOG) - self.render_elements(chain(*(enemy.objects() for enemy in game.enemies))) - self.render_elements(game.enemies) + self.render_elements(chain(*(enemy.objects() for enemy in game.enemies if enemy._visible))) + self.render_elements(enemy for enemy in game.enemies if enemy._visible) self.render_elements(game.effects) self.render_elements(chain(game.players_bullets, game.players,
--- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -985,10 +985,6 @@ class ECLRunner(object): @instruction(132) def set_visible(self, value): self._enemy._visible = not bool(value) - if not self._enemy._visible: - if self._enemy._sprite: - self._enemy._sprite._removed = True - self._enemy.aux_anm = 8 * [None] @instruction(131)