Index: frozen-bubble
===================================================================
RCS file: /opt/cvs/frozen-bubble/frozen-bubble,v
retrieving revision 1.318
diff -u -r1.318 frozen-bubble
--- frozen-bubble	23 Nov 2006 21:46:03 -0000	1.318
+++ frozen-bubble	29 Nov 2006 20:13:58 -0000
@@ -2885,12 +2885,14 @@
         }
         my $y = 80;
         my $counter = 1;
+        my $lastvalue;
         foreach my $high (ordered_mptrain_highscores()) {
             my $font = $new_entry == $high ? 'bold_menu' : 'menu';
-            print_($font, $app, $parts{rank}{xpos}, $y, "$counter. ", $parts{rank}{width}, 'right');
+            $high->{score} ne $lastvalue and print_($font, $app, $parts{rank}{xpos}, $y, "$counter. ", $parts{rank}{width}, 'right');
             print_($font, $app, $parts{name}{xpos}, $y, "$high->{name}: $high->{score}", $parts{name}{width});
             $y += $smg_lineheight + 2;
             $counter++;
+            $lastvalue = $high->{score};
         }
 
         print_('menu', $app, 320, 50, t("Chain-reaction enabled"), 320, 'center');
@@ -2900,13 +2902,15 @@
             $parts{$_}{xpos} = 640 - $parts{$_}{xpos} - $parts{$_}{width} foreach keys %parts;
         }
         $y = 80;
-        my $counter = 1;
+        $counter = 1;
+        $lastvalue = undef;
         foreach my $high (ordered_mptrain_highscores_chainreaction()) {
             my $font = $new_entry == $high ? 'bold_menu' : 'menu';
-            print_($font, $app, $parts{rank}{xpos}, $y, "$counter. ", $parts{rank}{width}, 'right');
+            $high->{score} ne $lastvalue and print_($font, $app, $parts{rank}{xpos}, $y, "$counter. ", $parts{rank}{width}, 'right');
             print_($font, $app, $parts{name}{xpos}, $y, "$high->{name}: $high->{score}", $parts{name}{width});
             $y += $smg_lineheight + 2;
             $counter++;
+            $lastvalue = $high->{score};
         }
 
         $app->flip;
@@ -4738,7 +4742,7 @@
 
         push @$scores, \%new_entry;
         if (@$scores == 21) {
-            my @high = ordered_mptrain_highscores();
+            my @high = sort { $b->{score} <=> $a->{score} } @$scores;
             pop @high;
             if ($chainreaction) {
                 $HISCORES_MPTRAIN_CHAINREACTION = \@high;

