Mercurial > rinkhals
changeset 212:b999abd5993b
Fix missed status flag in animations
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 21:35:40 +0000 |
parents | f65e4e5b7347 |
children | 07b361ebd87f |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Fri Sep 04 21:30:33 2009 +0000 +++ b/gamelib/gameboard.py Fri Sep 04 21:35:40 2009 +0000 @@ -163,13 +163,14 @@ us = [] x, y = self.vid.view.x, self.vid.view.y for anim in self.gameboard.animations[:]: - """Handle completed animations""" + # We process removed animations 1st, so we redraw things correctly if anim.removed: us.append(pygame.Rect(anim.irect.x - x, anim.irect.y - y, anim.irect.width, anim.irect.height)) self.gameboard.animations.remove(anim) # Flag the underlying tiles/sprites to be redrawn self.vid.alayer[anim.pos.y][anim.pos.x]=1 + self.vid.updates.append(anim.pos.to_tuple()) us.extend(self.vid.update(surface)) for anim in self.gameboard.animations: if anim.updated: