diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-08 13:03:27 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-08 13:03:27 +0200 |
commit | 1bf857aa6e760089534bec5c17783d74f035d983 (patch) | |
tree | 78f1a8245878f3fc47c383725e3b723af268388d | |
parent | ef0eb088ab25d819c590c870ae20a9f546c059de (diff) | |
download | roflnauts-1bf857aa6e760089534bec5c17783d74f035d983.zip roflnauts-1bf857aa6e760089534bec5c17783d74f035d983.tar.gz roflnauts-1bf857aa6e760089534bec5c17783d74f035d983.tar.bz2 |
Hotfix for destroyed bodies
-rw-r--r-- | player.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -97,6 +97,8 @@ end -- Update callback of `Player` function Player:update (dt) + -- hotfix? for destroyed bodies + if self.body:isDestroyed() then return end -- # LOCALS -- velocity: x, y local x,y = self.body:getLinearVelocity() @@ -377,7 +379,7 @@ function Player:damage (horizontal, vertical) self.body:setLinearVelocity(x,0) self.body:applyLinearImpulse((42+10*self.combo)*horizontal, (68+10*self.combo)*vertical + 15) self:changeAnimation("damage") - self.combo = math.min(20, self.combo + 1) + self.combo = math.min(80, self.combo + 1) self.punchcd = 0.07 + self.combo*0.005 self:playSound(2) end |