changeset 352:4e158a7bd119

Stop infinte attacks
author Neil Muller <drnlmuller@gmail.com>
date Sat, 09 Apr 2011 13:47:21 +0200
parents 02d889fd5708
children 3ac03073218f
files skaapsteker/sprites/base.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/sprites/base.py	Sat Apr 09 13:56:48 2011 +0200
+++ b/skaapsteker/sprites/base.py	Sat Apr 09 13:47:21 2011 +0200
@@ -163,7 +163,7 @@
     def update(self):
         AnimatedGameSprite.update(self)
         if self._animation == 'attacking':
-            if self._frame == 0 and self._done_attack and (self._last_time - self._start_attack_time) > self.frame_pause:
+            if self._frame == 0 and self._done_attack:
                 # We've just looped through the animation sequence
                 self._animation = self._old_state
                 self.facing = self._old_facing
@@ -176,7 +176,7 @@
         """Overriden by monster classes"""
         if self.check_collides(self._target):
             self._target.damage(self.attack_damage)
-            self._done_attack = True
+        self._done_attack = True
 
     def start_attack(self, player):
         if self._animation == 'attacking':