diff pytouhou/game/game.py @ 229:5afc75f71fed

Add “SHT” support to EoSD, and do a little cleanup.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 30 Dec 2011 18:37:06 +0100
parents 31460b2ec530
children 77b83064b57e
line wrap: on
line diff
--- a/pytouhou/game/game.py
+++ b/pytouhou/game/game.py
@@ -243,8 +243,8 @@ class Game(object):
             if py < 128 and player.state.power >= 128: #TODO: check py.
                 self.autocollect(player)
 
+            half_size = player.sht.item_hitbox / 2.
             for item in self.items:
-                half_size = item.hitbox_half_size
                 bx, by = item.x, item.y
                 bx1, bx2 = bx - half_size, bx + half_size
                 by1, by2 = by - half_size, by + half_size