]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
Add a note on where to add new effects. Update hash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index c2b9138c6b5b45d0d7d018284a31cb3a161c97f8..3567a2b095d522857ec2e2e4454de22c3e2d3dd5 100644 (file)
@@ -316,20 +316,7 @@ string ScoreString(int pFlags, float pValue)
        if((pValue == 0) && (pFlags & (SFL_HIDE_ZERO | SFL_RANK | SFL_TIME)))
                valstr = "";
        else if(pFlags & SFL_RANK)
-       {
-               valstr = ftos(pValue);
-               l = strlen(valstr);
-               if((l >= 2) && (substring(valstr, l - 2, 1) == "1"))
-                       valstr = strcat(valstr, "th");
-               else if(substring(valstr, l - 1, 1) == "1")
-                       valstr = strcat(valstr, "st");
-               else if(substring(valstr, l - 1, 1) == "2")
-                       valstr = strcat(valstr, "nd");
-               else if(substring(valstr, l - 1, 1) == "3")
-                       valstr = strcat(valstr, "rd");
-               else
-                       valstr = strcat(valstr, "th");
-       }
+               valstr = count_ordinal(pValue);
        else if(pFlags & SFL_TIME)
                valstr = TIME_ENCODED_TOSTRING(pValue);
        else
@@ -457,7 +444,7 @@ STATIC_INIT(compressShortVector)
                l *= f;
        }
 
-       if(cvar("developer"))
+       if(cvar("developer") > 0)
        {
                LOG_TRACE("Verifying vector compression table...");
                for(i = 0x0F00; i < 0xFFFF; ++i)
@@ -521,8 +508,8 @@ string fixPriorityList(string order, float from, float to, float subtract, float
                n = tokenize_console(neworder);
                for(w = to; w >= from; --w)
                {
-                       int wflags = Weapons_from(w).spawnflags;
-                       if((wflags & WEP_FLAG_HIDDEN) && (wflags & WEP_FLAG_MUTATORBLOCKED) && !(wflags & WEP_FLAG_NORMAL))
+                       int wflags = REGISTRY_GET(Weapons, w).spawnflags;
+                       if(wflags & WEP_FLAG_SPECIALATTACK)
                                continue;
                        for(i = 0; i < n; ++i)
                                if(stof(argv(i)) == w)
@@ -1399,7 +1386,12 @@ float get_model_parameters(string m, float sk)
                                case "reserved":    get_model_parameters_species = SPECIES_RESERVED;    break;
                        }
                if(c == "sex")
+               {
+                       if (s == "Male")                                s = _("Male");
+                       else if (s == "Female")                 s = _("Female");
+                       else if (s == "Undisclosed")    s = _("Undisclosed");
                        get_model_parameters_sex = s;
+               }
                if(c == "weight")
                        get_model_parameters_weight = stof(s);
                if(c == "age")