summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2011-12-15 01:07:23 -0800
committerPatrick Davison <snapwilliam@gmail.com>2011-12-15 01:07:23 -0800
commite5100daf160ead697d91d06952257cd1635c23e9 (patch)
tree6db8d42befa8bacc75a2bd5782ae5f48f75fe9f6 /js
parent4d822cf99076242ff11fc362a6c377bc85d10b2a (diff)
downloadpathery-e5100daf160ead697d91d06952257cd1635c23e9.tar.xz
Slight changes to the score notifications and sounds. Reduced sounds.
Diffstat (limited to 'js')
-rw-r--r--js/mapspecs.js8
1 files 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);