Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Prevent jumping noises while going through pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilhelmi committed Oct 18, 2013
1 parent 6db6df5 commit 31de10f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,15 @@ function walkToPipe() {
mario = placeMario();
startWalking(mario);
map.canscroll = false;


var hasPipingStarted = false;
var move = setInterval(function() {
if(mario.piping) {
if(mario.piping && !hasPipingStarted) {
// We have started piping
hasPipingStarted = true;
}
else if ( !mario.piping && hasPipingStarted ) {
// piping has finished
if(sounds[0]) sounds[0].pause();
nokeys = mario.keys.run = notime = false;
clearInterval(move);
Expand Down

0 comments on commit 31de10f

Please sign in to comment.