summaryrefslogtreecommitdiff
path: root/gamestate.lua
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:25:20 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:25:20 +0200
commit6ace1a5e3a8892253c0e744650419d7dc20898f4 (patch)
treed60008a3a2485bf01d8fa1ee83a679d2dc50a081 /gamestate.lua
parent611fc24518c435aac82b28b8a1ea0e832930325f (diff)
Fix sound issue when picking 2 power pellets simultaneously
Diffstat (limited to 'gamestate.lua')
-rwxr-xr-xgamestate.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/gamestate.lua b/gamestate.lua
index 0cfd2e2..2e56307 100755
--- a/gamestate.lua
+++ b/gamestate.lua
@@ -163,10 +163,10 @@ function mypacman.on_player_got_power_pellet(player)
local powersound = minetest.sound_play("mypacman_powerup", {pos = boardcenter,max_hear_distance = 20, object=player, loop=true})
minetest.after(power_pellet_duration, function()
+ minetest.sound_stop(powersound)
if os.time() >= (gamestate.power_pellet or 0) then
gamestate.power_pellet = false
minetest.chat_send_player(name, "POWER PELLET wore off")
- minetest.sound_stop(powersound)
end
end)
end