]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow translating gender of player models
authorterencehill <piuntn@gmail.com>
Tue, 23 Apr 2019 15:18:00 +0000 (17:18 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 23 Apr 2019 15:18:00 +0000 (17:18 +0200)
Remove wrong attempt to load a translated txt file associated with the player model (it never worked because the input string of language_filename is a pattern (models/player/*_*.txt), not a specific file name)

qcsrc/common/util.qc
qcsrc/menu/xonotic/playermodel.qc

index c2b9138c6b5b45d0d7d018284a31cb3a161c97f8..0366f4604857df60615ec2cde4a7396cf155e77a 100644 (file)
@@ -1399,7 +1399,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")
index 1ad651bdb5a5824deef0e972601fd469fadb7fb4..08518d1312a6fd3f59351ca38fcc8daa229c9a8d 100644 (file)
@@ -27,7 +27,7 @@ void XonoticPlayerModelSelector_loadModels(entity me)
        int i;
        string fn;
 
-       float glob = search_begin(language_filename(get_model_datafilename(string_null, -1, "txt")), true, true);
+       float glob = search_begin(get_model_datafilename(string_null, -1, "txt"), true, true);
        if (glob < 0)
                return;