changeset 114:92772413b5a6

Fix special bullet function/flags handling
author Thibaut Girka <thib@sitedethib.com>
date Wed, 07 Sep 2011 00:29:12 +0200
parents 732c64662f87
children f0e6ae22d29a
files pytouhou/game/bullet.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/game/bullet.py
+++ b/pytouhou/game/bullet.py
@@ -142,7 +142,7 @@ class Bullet(object):
             acceleration, angular_speed = self.attributes[4:6]
             self.speed += acceleration
             self.angle += angular_speed
-            if self.frame == frame:
+            if self.frame != 0 and self.frame % frame == 0:
                 if count > 0:
                     self.attributes[1] -= 1
                 else:
@@ -151,7 +151,7 @@ class Bullet(object):
             #TODO: check
             frame, count = self.attributes[0:2]
             angle, speed = self.attributes[4:6]
-            if frame == self.frame:
+            if self.frame != 0 and self.frame % frame == 0:
                 count = count - 1
 
                 if self.flags & 64: