]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a 'hidden' option to playermodel info files, hide mega erebus from the menu ...
authorMario <mario@smbclan.net>
Tue, 30 Aug 2016 15:23:07 +0000 (01:23 +1000)
committerMario <mario@smbclan.net>
Tue, 30 Aug 2016 15:23:07 +0000 (01:23 +1000)
models/player/megaerebus.iqm_0.txt
models/player/pyria.iqm_0.skin
models/player/pyria_lod1.iqm_0.skin
models/player/pyria_lod2.iqm_0.skin
models/player/seraphinamasked.iqm_0.skin
models/player/seraphinamasked_lod1.iqm_0.skin
models/player/seraphinamasked_lod2.iqm_0.skin
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/xonotic/playermodel.qc

index f75a15fb8ef55b3cf7b06abeaec7ba451ae9ab9f..f4b62dea70bce940d29eb41f959c5e349580dd6f 100644 (file)
@@ -11,3 +11,4 @@ bone_aim2 0.2 upperarm_L
 bone_aim3 0.35 bip01 r hand
 bone_weapon bip01 r hand
 fixbone 1
+hidden 1
index 1932354e8078c3f24947504da7bbb93390c5a51a..7533a4c53adab086fe9866c766df919d631666f7 100644 (file)
@@ -1,2 +1,2 @@
 pyria_obj.001,pyriahair
-pyria_obj,pyriafullbright
+pyria_obj,pyria
index 1932354e8078c3f24947504da7bbb93390c5a51a..7533a4c53adab086fe9866c766df919d631666f7 100644 (file)
@@ -1,2 +1,2 @@
 pyria_obj.001,pyriahair
-pyria_obj,pyriafullbright
+pyria_obj,pyria
index 1932354e8078c3f24947504da7bbb93390c5a51a..7533a4c53adab086fe9866c766df919d631666f7 100644 (file)
@@ -1,2 +1,2 @@
 pyria_obj.001,pyriahair
-pyria_obj,pyriafullbright
+pyria_obj,pyria
index 7b94ebe4a4e61e1d7e0803fb86a91a60fb3ecf4e..7138ad587e31e81451b941144041fa5ffec81ec0 100644 (file)
@@ -1,2 +1,2 @@
-ignis42,ignisfullbright
+ignis42,ignis
 ignis42.002,ignishead
index 7b94ebe4a4e61e1d7e0803fb86a91a60fb3ecf4e..7138ad587e31e81451b941144041fa5ffec81ec0 100644 (file)
@@ -1,2 +1,2 @@
-ignis42,ignisfullbright
+ignis42,ignis
 ignis42.002,ignishead
index 7b94ebe4a4e61e1d7e0803fb86a91a60fb3ecf4e..7138ad587e31e81451b941144041fa5ffec81ec0 100644 (file)
@@ -1,2 +1,2 @@
-ignis42,ignisfullbright
+ignis42,ignis
 ignis42.002,ignishead
index 22ee95ae3e60f88b01d4217b7361c752c23c4e38..962c5807067b28dd622a2f83bd78a3ba79c7f014 100644 (file)
@@ -1229,6 +1229,7 @@ float get_model_parameters(string m, float sk)
                get_model_parameters_bone_aimweight[i] = 0;
        }
        get_model_parameters_fixbone = 0;
+       get_model_parameters_hidden = false;
 
 #ifdef GAMEQC
        MUTATOR_CALLHOOK(ClearModelParams);
@@ -1306,6 +1307,8 @@ float get_model_parameters(string m, float sk)
                        }
                if(c == "fixbone")
                        get_model_parameters_fixbone = stof(s);
+               if(c == "hidden")
+                       get_model_parameters_hidden = stob(s);
        }
 
        while((s = fgets(fh)))
index 90e2152d0179f17336bf7a7b1a1546fac3948cb5..57f9a2217c42d5a502e8268c139bd8f082094d29 100644 (file)
@@ -181,6 +181,7 @@ float get_model_parameters_species;
 string get_model_parameters_sex;
 float get_model_parameters_weight;
 float get_model_parameters_age;
+bool get_model_parameters_hidden;
 string get_model_parameters_description;
 string get_model_parameters_bone_upperbody;
 string get_model_parameters_bone_weapon;
index 1a90fa737827bc8e2afaa6b074306d815439d046..c679d4449d7177598dc649228f7e4cc96b11be76 100644 (file)
@@ -38,6 +38,8 @@ void XonoticPlayerModelSelector_loadModels(entity me)
                fn = search_getfilename(glob, i);
                if(!get_model_parameters(fn, -1))
                        continue;
+               if(get_model_parameters_hidden)
+                       continue;
                bufstr_add(sortbuf, sprintf("%-128s%s", get_model_parameters_name, fn), 1);
        }
        search_end(glob);
@@ -49,6 +51,8 @@ void XonoticPlayerModelSelector_loadModels(entity me)
                fn = substring(bufstr_get(sortbuf, i), 128, -1);
                if(!get_model_parameters(fn, -1))
                        error("But it JUST worked!");
+               if(get_model_parameters_hidden)
+                       continue;
                bufstr_set(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_TITLE, get_model_parameters_name);
                bufstr_set(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_IMAGE, strcat("/", substring(get_model_datafilename(get_model_parameters_modelname, get_model_parameters_modelskin, "tga"), 0, -5)));
                bufstr_set(me.bufModels, BUFMODELS_COUNT*i+BUFMODELS_MODEL, get_model_parameters_modelname);