X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fplayermodel.qc;h=08518d1312a6fd3f59351ca38fcc8daa229c9a8d;hb=06a08d0c6b573f2562297147171aff3d990fa42d;hp=c679d4449d7177598dc649228f7e4cc96b11be76;hpb=8c965aa90470cfa8cbfaff88db71b6b5899a90ce;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/playermodel.qc b/qcsrc/menu/xonotic/playermodel.qc index c679d4449..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; @@ -113,21 +113,12 @@ void XonoticPlayerModelSelector_go(entity me, float d) { me.idxModels = mod(me.idxModels + d + me.numModels, me.numModels); - if(me.currentModel) - strunzone(me.currentModel); - if(me.currentModelTitle) - strunzone(me.currentModelTitle); - if(me.currentModelImage) - strunzone(me.currentModelImage); - if(me.currentModelDescription) - strunzone(me.currentModelDescription); - // select model #i! - me.currentModelTitle = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_TITLE)); - me.currentModelImage = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_IMAGE)); + strcpy(me.currentModelTitle, bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_TITLE)); + strcpy(me.currentModelImage, bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_IMAGE)); me.currentSkin = stof(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_SKIN)); - me.currentModel = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_MODEL)); - me.currentModelDescription = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_DESC)); + strcpy(me.currentModel, bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_MODEL)); + strcpy(me.currentModelDescription, bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_DESC)); // fix the image if(draw_PictureSize(me.currentModelImage) == '0 0 0')