From: terencehill Date: Tue, 23 Apr 2019 15:18:00 +0000 (+0200) Subject: Allow translating gender of player models X-Git-Tag: xonotic-v0.8.5~1532 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ac55e67fb51bbd9a4d878c830df885f18715ef11;p=xonotic%2Fxonotic-data.pk3dir.git Allow translating gender of player models 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) --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index c2b9138c6..0366f4604 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -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") diff --git a/qcsrc/menu/xonotic/playermodel.qc b/qcsrc/menu/xonotic/playermodel.qc index 1ad651bdb..08518d131 100644 --- a/qcsrc/menu/xonotic/playermodel.qc +++ b/qcsrc/menu/xonotic/playermodel.qc @@ -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;