comparison pytouhou/game/bullet.pyx @ 267:35644a67ba4c

Fix Sakuya's bouncing knives
author Thibaut Girka <thib@sitedethib.com>
date Mon, 23 Jan 2012 22:04:40 +0100
parents e22e0d73f614
children f3099ebf4f61
comparison
equal deleted inserted replaced
266:3a86c4e070dc 267:35644a67ba4c
260 self.angle = pi - self.angle 260 self.angle = pi - self.angle
261 self._removed = False 261 self._removed = False
262 if self.y < 0 or ((self.flags & 1024) and self.y > self._game.height): 262 if self.y < 0 or ((self.flags & 1024) and self.y > self._game.height):
263 self.angle = -self.angle 263 self.angle = -self.angle
264 self._removed = False 264 self._removed = False
265 self._sprite.angle = self.angle
266 if self._sprite.automatic_orientation:
267 self._sprite._changed = True
265 self.dx = cos(self.angle) * self.speed 268 self.dx = cos(self.angle) * self.speed
266 self.dy = sin(self.angle) * self.speed 269 self.dy = sin(self.angle) * self.speed
267 self.attributes[0] -= 1 270 self.attributes[0] -= 1
268 271