summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-07-16 06:34:26 +0200
committerAki <nthirtyone@gmail.com>2016-07-16 06:34:26 +0200
commitcf64402b9221a74be86748aaebe6910d544cb33b (patch)
tree6db3cbd9ea5cab3a6d81425d07f152f2695607d4
parent937f24699ce35a0c42b67c0fa8c1de8b9947b6a0 (diff)
downloadroflnauts-cf64402b9221a74be86748aaebe6910d544cb33b.zip
roflnauts-cf64402b9221a74be86748aaebe6910d544cb33b.tar.gz
roflnauts-cf64402b9221a74be86748aaebe6910d544cb33b.tar.bz2
Fixed animation issue on punch and walk
-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