From a5a9425534bcef03f070d1cc8e332799b7d33dce Mon Sep 17 00:00:00 2001 From: echicken <> Date: Thu, 1 Dec 2011 20:18:23 +0000 Subject: [PATCH] Some changes to score calculation & display. --- xtrn/chickendelivery/game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtrn/chickendelivery/game.js b/xtrn/chickendelivery/game.js index 858bd14e51..82d325f2d3 100644 --- a/xtrn/chickendelivery/game.js +++ b/xtrn/chickendelivery/game.js @@ -178,7 +178,7 @@ while(!js.terminated) { if(levelCompleted) { levelCompleted = false; - var timeScore = parseInt((timeLimit - timeElapsed) * timeBonus); + var timeScore = (parseInt(timeLimit) - parseInt(timeElapsed)) * timeBonus; var lastScore = score; score = score + parseInt(door[3]) + timeScore; if(lastScore < mileStone && score >= mileStone) { @@ -433,7 +433,7 @@ function showNetScores() { highScores.sort(function(a, b) { return b - a }); for(var h = 0; h < 14; h++) { for(var s in scores) { - if(scores[s].score == highScores[h]) { + if(scores[s].score == highScores[h] && scores[s].score > 0) { var online = " "; for each(var u in onlinePlayers) { if(u.nick == scores[s].name) { -- GitLab