summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-06-28 21:18:09 +0200
committerAki <nthirtyone@gmail.com>2017-06-28 21:18:09 +0200
commitb5c3f635128845baa6fdc738df44c5fe88b3db82 (patch)
tree73fa4bc18453615209d9237fc36b3015a7de9859
parent75e30a649bd41029e48344969225e8ff329a86b4 (diff)
downloadroflnauts-b5c3f635128845baa6fdc738df44c5fe88b3db82.zip
roflnauts-b5c3f635128845baa6fdc738df44c5fe88b3db82.tar.gz
roflnauts-b5c3f635128845baa6fdc738df44c5fe88b3db82.tar.bz2
Fixed animation bug for Player on walking combination
-rw-r--r--not/Player.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/not/Player.lua b/not/Player.lua
index 5d108ce..34f57eb 100644
--- a/not/Player.lua
+++ b/not/Player.lua
@@ -134,10 +134,11 @@ function Player:controlreleased (set, action, key)
end
-- Walking
if (action == "left" or action == "right") then
- self.isWalking = false
- if not (self:isControlDown("left") or self:isControlDown("right")) and
- self.current == self.animations.walk then
- self:setAnimation("default")
+ if not (self:isControlDown("left") or self:isControlDown("right")) then
+ self.isWalking = false
+ if self.current == self.animations.walk then
+ self:setAnimation("default")
+ end
end
end
end