scenes/levels: fix two crash in player.lua

This commit is contained in:
Kazhnuz 2019-03-03 15:56:13 +01:00
parent 2ba1d5cdaa
commit 5f68f2a550
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ end
function Player:changeWeapon(id)
local maxWeapon = #self.stats.weaponList
self.weaponID = wrap(id, maxWeapon)
self.weaponID = utils.math.wrap(id, 1, maxWeapon)
self:setWeapon()
end
@ -264,7 +264,7 @@ function Player:die()
--self.xsp = 0
--self.ysp = 0
--currentLevel.world:update(self, self.x,self.y)
self.level:setDeathTimer(1)
self.manager:setDeathTimer(1)
self:destroy()
end