]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
Merge remote-tracking branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index 69fde0f99d368d17901b2b5cae2634896bae6424..19339a36e99635908c379b21383ceff01d7dc42a 100644 (file)
@@ -195,21 +195,21 @@ vector colormapPaletteColor(float c, float isPants)
 {
        switch(c)
        {
-               case  0: return '0.800000 0.800000 0.800000';
-               case  1: return '0.600000 0.400000 0.000000';
+               case  0: return '1.000000 1.000000 1.000000';
+               case  1: return '1.000000 0.333333 0.000000';
                case  2: return '0.000000 1.000000 0.501961';
                case  3: return '0.000000 1.000000 0.000000';
                case  4: return '1.000000 0.000000 0.000000';
-               case  5: return '0.000000 0.658824 1.000000';
+               case  5: return '0.000000 0.666667 1.000000';
                case  6: return '0.000000 1.000000 1.000000';
                case  7: return '0.501961 1.000000 0.000000';
                case  8: return '0.501961 0.000000 1.000000';
                case  9: return '1.000000 0.000000 1.000000';
                case 10: return '1.000000 0.000000 0.501961';
-               case 11: return '0.600000 0.600000 0.600000';
+               case 11: return '0.000000 0.000000 1.000000';
                case 12: return '1.000000 1.000000 0.000000';
-               case 13: return '0.000000 0.313725 1.000000';
-               case 14: return '1.000000 0.501961 0.000000';
+               case 13: return '0.000000 0.333333 1.000000';
+               case 14: return '1.000000 0.666667 0.000000';
                case 15:
                        if(isPants)
                                return
@@ -396,27 +396,6 @@ void buf_save(float buf, string pFilename)
        fclose(fh);
 }
 
-string GametypeNameFromType(float g)
-{
-       if      (g == GAME_DEATHMATCH) return "dm";
-       else if (g == GAME_TEAM_DEATHMATCH) return "tdm";
-       else if (g == GAME_DOMINATION) return "dom";
-       else if (g == GAME_CTF) return "ctf";
-       else if (g == GAME_RUNEMATCH) return "rune";
-       else if (g == GAME_LMS) return "lms";
-       else if (g == GAME_ARENA) return "arena";
-       else if (g == GAME_CA) return "ca";
-       else if (g == GAME_KEYHUNT) return "kh";
-       else if (g == GAME_ONSLAUGHT) return "ons";
-       else if (g == GAME_ASSAULT) return "as";
-       else if (g == GAME_RACE) return "rc";
-       else if (g == GAME_NEXBALL) return "nexball";
-       else if (g == GAME_CTS) return "cts";
-       else if (g == GAME_FREEZETAG) return "freezetag";
-       else if (g == GAME_KEEPAWAY) return "ka";
-       return "dm";
-}
-
 string mmsss(float tenths)
 {
        float minutes;
@@ -1430,7 +1409,7 @@ string textShortenToLength(string theText, float maxWidth, textLengthUpToLength_
 float isGametypeInFilter(float gt, float tp, float ts, string pattern)
 {
        string subpattern, subpattern2, subpattern3, subpattern4;
-       subpattern = strcat(",", GametypeNameFromType(gt), ",");
+       subpattern = strcat(",", MapInfo_Type_ToString(gt), ",");
        if(tp)
                subpattern2 = ",teams,";
        else
@@ -1439,7 +1418,7 @@ float isGametypeInFilter(float gt, float tp, float ts, string pattern)
                subpattern3 = ",teamspawns,";
        else
                subpattern3 = ",noteamspawns,";
-       if(gt == GAME_RACE || gt == GAME_CTS)
+       if(gt == MAPINFO_TYPE_RACE || gt == MAPINFO_TYPE_CTS)
                subpattern4 = ",race,";
        else
                subpattern4 = string_null;
@@ -2162,6 +2141,7 @@ entity ReadCSQCEntity()
        return findfloat(world, entnum, f);
 }
 #endif
+
 float shutdown_running;
 #ifdef SVQC
 void SV_Shutdown()
@@ -2183,4 +2163,4 @@ void m_shutdown()
                Shutdown();
        }
        cvar_settemp_restore(); // this must be done LAST, but in any case
-}
\ No newline at end of file
+}