]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix strwidth ;)
authorFruitieX <rasse@rasse-laptop.(none)>
Wed, 27 Oct 2010 09:26:56 +0000 (12:26 +0300)
committerFruitieX <rasse@rasse-laptop.(none)>
Wed, 27 Oct 2010 09:26:56 +0000 (12:26 +0300)
qcsrc/server/miscfunctions.qc

index 8f5376102fd38b9bca47c02be6f2bfc4eddadf07..40c513812ab72cd0715794dbdc0fa04a59cc9038 100644 (file)
@@ -2427,10 +2427,16 @@ string getladder()
            continue;
        s = strcat(s, strpad(4, race_placeName(i+1)), "^3| ^7"); // pos
        s = strcat(s, strpad(7, argv(LADDER_CNT+1)), "^3| ^7"); // total
-       for (j = 1; j <= LADDER_CNT; ++j)
+       for (j = 1; j <= min(9, LADDER_CNT); ++j)
        {
            s = strcat(s, strpad(4, argv(j)), "^3| ^7"); // 1st, 2nd, 3rd etc cnt
        }
+       if(LADDER_CNT > 9)
+               for (j = 10; j <= LADDER_CNT; ++j)
+               {
+                   s = strcat(s, strpad(4, argv(j)), " ^3| ^7"); // 1st, 2nd, 3rd etc cnt
+               }
+
        s = strcat(s, strpad(13, argv(0)), "^3| ^7"); // speed award cnt
        s = strcat(s, uid2name(top_uids[i]), "\n"); // name
     }