From 317c35f5d7869bedb6e46d8c63e9ef74078e7662 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 17 Dec 2015 17:51:22 +0100 Subject: [PATCH] Make work loading of playermodel descriptions in different languages --- models/player/erebus.iqm_0.txt.it | 13 +++++++++++++ qcsrc/common/util.qc | 4 ++-- qcsrc/menu/xonotic/playermodel.qc | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 models/player/erebus.iqm_0.txt.it diff --git a/models/player/erebus.iqm_0.txt.it b/models/player/erebus.iqm_0.txt.it new file mode 100644 index 000000000..5fbf1b33c --- /dev/null +++ b/models/player/erebus.iqm_0.txt.it @@ -0,0 +1,13 @@ +name Erebus +species umano +sex Maschio +weight 105 +age 26 +description Soldato peso massimo di Xonotic +bone_upperbody spine2 +bone_aim0 0.25 spine2 +bone_aim1 0.4 spine4 +bone_aim2 0.2 upperarm_L +bone_aim3 0.35 bip01 r hand +bone_weapon bip01 r hand +fixbone 1 diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index c81b1a576..73433252c 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1209,12 +1209,12 @@ float get_model_parameters(string m, float sk) m = substring(m, 0, -7); } - string fn = get_model_datafilename(m, sk, "txt"); + string fn = language_filename(get_model_datafilename(m, sk, "txt")); int fh = fopen(fn, FILE_READ); if(fh < 0) { sk = 0; - fn = get_model_datafilename(m, sk, "txt"); + fn = language_filename(get_model_datafilename(m, sk, "txt")); fh = fopen(fn, FILE_READ); if(fh < 0) return 0; diff --git a/qcsrc/menu/xonotic/playermodel.qc b/qcsrc/menu/xonotic/playermodel.qc index 5d58a1b03..1fa69dc2e 100644 --- a/qcsrc/menu/xonotic/playermodel.qc +++ b/qcsrc/menu/xonotic/playermodel.qc @@ -52,7 +52,7 @@ void XonoticPlayerModelSelector_configureXonoticPlayerModelSelector(entity me) float sortbuf, glob, i; string fn; - glob = search_begin(language_filename(get_model_datafilename(string_null, -1, "txt")), true, true); + glob = search_begin(get_model_datafilename(string_null, -1, "txt"), true, true); if (glob < 0) return; -- 2.39.2