From ac55e67fb51bbd9a4d878c830df885f18715ef11 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 23 Apr 2019 17:18:00 +0200 Subject: [PATCH] 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) --- qcsrc/common/util.qc | 5 +++++ qcsrc/menu/xonotic/playermodel.qc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.2