Mercurial > touhou
comparison pytouhou/ui/gamerenderer.pyx @ 271:80e73b8245a4
Fix visibility handling
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 24 Jan 2012 00:56:31 +0100 |
parents | 6bd565019f9a |
children | f037bca24f2d |
comparison
equal
deleted
inserted
replaced
270:7a9135b88853 | 271:80e73b8245a4 |
---|---|
78 | 78 |
79 if game is not None: | 79 if game is not None: |
80 self.setup_camera(0, 0, 1) | 80 self.setup_camera(0, 0, 1) |
81 | 81 |
82 glDisable(GL_FOG) | 82 glDisable(GL_FOG) |
83 self.render_elements(chain(*(enemy.objects() for enemy in game.enemies))) | 83 self.render_elements(chain(*(enemy.objects() for enemy in game.enemies if enemy._visible))) |
84 self.render_elements(game.enemies) | 84 self.render_elements(enemy for enemy in game.enemies if enemy._visible) |
85 self.render_elements(game.effects) | 85 self.render_elements(game.effects) |
86 self.render_elements(chain(game.players_bullets, | 86 self.render_elements(chain(game.players_bullets, |
87 game.players, | 87 game.players, |
88 *(player.objects() for player in game.players))) | 88 *(player.objects() for player in game.players))) |
89 self.render_elements(chain(game.bullets, game.cancelled_bullets, game.items)) | 89 self.render_elements(chain(game.bullets, game.cancelled_bullets, game.items)) |