diff --git a/src/menu-fn/defs.h b/src/menu-fn/defs.h index 7b930cac..d51baddb 100644 --- a/src/menu-fn/defs.h +++ b/src/menu-fn/defs.h @@ -76,6 +76,7 @@ typedef struct string pkgname; int pkgid; int nomodels; + int nosprays; int installed; string mpentity; string gamedll; diff --git a/src/menu-fn/m_customgame.qc b/src/menu-fn/m_customgame.qc index 4c36e6ce..5b5797e5 100644 --- a/src/menu-fn/m_customgame.qc +++ b/src/menu-fn/m_customgame.qc @@ -232,6 +232,7 @@ games_init(void) games[id].size = 0; games[id].type = "Both"; games[id].nomodels = 0; + games[id].nosprays = 0; games[id].mpentity = "info_player_deathmatch"; games[id].gamedll = "progs.dat"; games[id].startmap = "c0a0"; @@ -299,6 +300,9 @@ games_init(void) case "gameinfo_nomodels": games[id].nomodels = (int)stof(argv(i+1)); break; + case "gameinfo_nosprays": + games[id].nosprays = (int)stof(argv(i+1)); + break; case "gameinfo_mpentity": games[id].mpentity = argv(i+1); break; diff --git a/src/menu-fn/m_customize.qc b/src/menu-fn/m_customize.qc index f4d45873..e4e36745 100644 --- a/src/menu-fn/m_customize.qc +++ b/src/menu-fn/m_customize.qc @@ -136,31 +136,31 @@ menu_customize_init(void) cz_tbNetname.SetPos(212,160); cz_tbNetname.SetText(cvar_string("name")); Widget_Add(fn_customize, cz_tbNetname); - - cz_psSpray = spawn(CPictureSwitch); - cz_psSpray.SetPos(212,226); - cz_psSpray.SetSize(99,124); - cz_psSpray.SetPicSize(64,64); - cz_psSpray.SetPicOffset(14,14); - cz_psSpray.SetPics(g_sprays); - cz_psSpray.SetMax(g_sprayscount); - cz_psSpray.SetCallback(cz_cbSprayChanged); - cz_psSpray.SetValueS(cvar_string("_cl_playerspray")); - Widget_Add(fn_customize, cz_psSpray); - if (games[gameinfo_current].nomodels == 1) { - return; + if (games[gameinfo_current].nosprays == 0) { + cz_psSpray = spawn(CPictureSwitch); + cz_psSpray.SetPos(212,226); + cz_psSpray.SetSize(99,124); + cz_psSpray.SetPicSize(64,64); + cz_psSpray.SetPicOffset(14,14); + cz_psSpray.SetPics(g_sprays); + cz_psSpray.SetMax(g_sprayscount); + cz_psSpray.SetCallback(cz_cbSprayChanged); + cz_psSpray.SetValueS(cvar_string("_cl_playerspray")); + Widget_Add(fn_customize, cz_psSpray); } - cz_psModel = spawn(CPictureSwitch); - cz_psModel.SetPos(410,160); - cz_psModel.SetSize(170,221); - cz_psModel.SetPicSize(164,190); - cz_psModel.SetPics(g_models); - cz_psModel.SetMax(g_modelcount); - cz_psModel.SetCallback(cz_cbModelChanged); - cz_psModel.SetValueS(sprintf("models/player/%s/%s", cvar_string("_cl_playermodel"), cvar_string("_cl_playermodel"))); - Widget_Add(fn_customize, cz_psModel); + if (games[gameinfo_current].nomodels == 0) { + cz_psModel = spawn(CPictureSwitch); + cz_psModel.SetPos(410,160); + cz_psModel.SetSize(170,221); + cz_psModel.SetPicSize(164,190); + cz_psModel.SetPics(g_models); + cz_psModel.SetMax(g_modelcount); + cz_psModel.SetCallback(cz_cbModelChanged); + cz_psModel.SetValueS(sprintf("models/player/%s/%s", cvar_string("_cl_playermodel"), cvar_string("_cl_playermodel"))); + Widget_Add(fn_customize, cz_psModel); + } } void @@ -170,8 +170,12 @@ menu_customize_draw(void) Header_Draw(HEAD_CUSTOMIZE); WLabel_Static(212, 140, m_reslbl[IDS_PLAYERINFO_NAME], 14, 14, [1,1,1], 1.0f, 0, font_arial); + + if (games[gameinfo_current].nomodels == 0) WLabel_Static(410, 140, sprintf(m_reslbl[IDS_MODEL_NAME], cvar_string("_cl_playermodel")), 14, 14, [1,1,1], 1.0f, 0, font_arial); + + if (games[gameinfo_current].nosprays == 0) WLabel_Static(212, 203, m_reslbl[IDS_PROFILE_LOGO], 14, 14, [1,1,1], 1.0f, 0, font_arial); }