summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/player.lua b/player.lua
index f22bff8..ff15e6f 100644
--- a/player.lua
+++ b/player.lua
@@ -227,7 +227,10 @@ function Player:controllerPressed (key)
end
-- Walking
- if key == "left" or key == "right" then
+ if (key == "left" or key == "right") and
+ (self.current ~= self.animations.attack) and
+ (self.current ~= self.animations.attack_up) and
+ (self.current ~= self.animations.attack_down) then
self:changeAnimation("walk")
end