From e5100daf160ead697d91d06952257cd1635c23e9 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Thu, 15 Dec 2011 01:07:23 -0800 Subject: Slight changes to the score notifications and sounds. Reduced sounds. --- js/mapspecs.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/mapspecs.js b/js/mapspecs.js index 8659b7a..68be78c 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -444,6 +444,7 @@ function doanimate(x, y, p, c, mapid) { //Saw someone do this, thought it was clever. //Switch for range result. var disptext = "" + var improvedScore = (count[mapid] > mapjson[mapid].mybest); switch (true) { case (count[mapid] > mapjson[mapid].best): disptext = "Beat "+mapjson[mapid].bestby+"'s record of "+mapjson[mapid].best+" with "+count[mapid]+"!"; @@ -461,15 +462,16 @@ function doanimate(x, y, p, c, mapid) { disptext = "Tied personal best of "+count[mapid]; break; + case (count[mapid] < mapjson[mapid].mybest): + disptext = "You got "+count[mapid]+". Your best is "+mapjson[mapid].mybest; + break; } //if anything worth mentioning happend let them know. if (disptext != "") { - if (checkSound(mapid)) { + if (checkSound(mapid) && improvedScore) { soundManager.setVolume('charm', 50); - soundManager.setVolume('bling', 50); soundManager.setVolume('sc', 50); soundManager.play('charm'); - soundManager.play('bling'); soundManager.play('sc'); } updateDsp(mapid, 'dspID', disptext); -- cgit v1.2.3