summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/player.lua b/player.lua
index 366fe5d..db6a683 100644
--- a/player.lua
+++ b/player.lua
@@ -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