changeset 241:4c5941cf2b7f

Fix off-by-one errors in attack animation sequence
author Neil Muller <drnlmuller@gmail.com>
date Thu, 07 Apr 2011 14:58:16 +0200
parents 9adf5076f3a2
children c30fcf903d29
files skaapsteker/sprites/base.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/sprites/base.py	Thu Apr 07 14:55:29 2011 +0200
+++ b/skaapsteker/sprites/base.py	Thu Apr 07 14:58:16 2011 +0200
@@ -146,6 +146,7 @@
                 # We've just looped through the animation sequence
                 self._animation = self._old_state
                 self.facing = self._old_facing
+                self._update_image()
             elif self._frame == self.attack_frame and self._tick == 5:
                 # Attack the player
                 self.do_attack()
@@ -165,6 +166,7 @@
             self._animation = 'attacking'
             self._tick = 1
             self._frame = 0  # Start the attack from the beginning
+            self._update_image()
         else:
             player.damage(1)  # collision damage