Skip to content

Commit

Permalink
fixed laser again
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleP committed Jun 30, 2016
1 parent 811cdc4 commit 6cd4dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions classes/player.lua
Expand Up @@ -227,7 +227,7 @@ end

function player:shoot()
if self.shootingTimer == 0 then
if self.powerup == "nobullets" or self.powerup == "freeze" then
if self.powerup == "nobullets" or self.powerup == "freeze" or megaCannonSound:isPlaying() then
return
end

Expand All @@ -243,10 +243,8 @@ function player:shoot()
if self:isValidBullet(self.powerup) then
bulletType = self.powerup
elseif self.powerup == "mega" then
if not megaCannonSound:isPlaying() then
table.insert(objects["bullet"], megacannon:new(self))
self:setPowerup("none")
end
table.insert(objects["bullet"], megacannon:new(self))
self:setPowerup("none")
return
end

Expand Down
2 changes: 1 addition & 1 deletion main.lua
Expand Up @@ -217,7 +217,7 @@ function love.load()
love.graphics.set3D(true)
versionString = "1.0.1"
versionString = "1.0.2"
loadSettings()
Expand Down

0 comments on commit 6cd4dad

Please sign in to comment.