Skip to content

Commit

Permalink
Fix pause menu crashing when closing it
Browse files Browse the repository at this point in the history
  • Loading branch information
Stabyourself committed Aug 6, 2018
1 parent 6d7f41f commit 0caed02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions game.lua
Expand Up @@ -2663,7 +2663,7 @@ function game_keypressed(key, unicode)
elseif (key == "return" or key == "enter" or key == "kpenter" or key == "space") then
if pausemenuoptions[pausemenuselected] == "resume" then
pausemenuopen = false
love.audio.resume()
playmusic()
elseif pausemenuoptions[pausemenuselected] == "suspend" then
suspendprompt = true
pausemenuselected2 = 1
Expand All @@ -2676,7 +2676,7 @@ function game_keypressed(key, unicode)
end
elseif key == "escape" then
pausemenuopen = false
love.audio.resume()
playmusic()
elseif (key == "right" or key == "d") then
if pausemenuoptions[pausemenuselected] == "volume" then
if volume < 1 then
Expand Down
2 changes: 1 addition & 1 deletion musicloader.lua
Expand Up @@ -39,7 +39,7 @@ function music:play(name)
self:onLoad(name, source)
end
if self.loaded[name] then
playsound(self.loaded[name])
self.loaded[name]:play()
end
end
end
Expand Down

0 comments on commit 0caed02

Please sign in to comment.