Skip to content

Commit d539687

Browse files
committed
Only show missing icons if we want to see them
Toggling ui_showAllSkins causes the game to hitch for a moment but it's better than making it a CVAR_LATCH.
1 parent c4b2846 commit d539687

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

codemp/ui/ui_local.h

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void UI_Load( void );
4949
void UI_LoadMenus( const char *menuFile, qboolean reset );
5050
void UI_LoadArenas( void );
5151
void UI_LoadForceConfig_List( void );
52+
void UI_BuildQ3Model_List( void );
5253

5354
//
5455
// ui_players.c

codemp/ui/ui_main.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -11014,6 +11014,9 @@ static qboolean bIsSkinFile(const char* dirptr, const char* skinname)
1101411014
char fpath[MAX_QPATH];
1101511015
int f;
1101611016

11017+
if (!ui_showAllSkins.integer)
11018+
return qfalse;
11019+
1101711020
//don't list non-humanoid skins... - these aren't caught by the other checks below
1101811021
if (!Q_stricmpn(dirptr, "default", 7))
1101911022
return qfalse;
@@ -11053,7 +11056,7 @@ static qboolean bIsSkinFile(const char* dirptr, const char* skinname)
1105311056
PlayerModel_BuildList
1105411057
=================
1105511058
*/
11056-
static void UI_BuildQ3Model_List( void )
11059+
void UI_BuildQ3Model_List( void )
1105711060
{
1105811061
int numdirs;
1105911062
int numfiles;

codemp/ui/ui_xcvar.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ XCVAR_DEF( cg_strafeHelper, "3008", NULL, CVAR_ARCHIVE_ND )
161161
XCVAR_DEF( cg_stylePlayer, "0", NULL, CVAR_ARCHIVE )
162162
XCVAR_DEF( cg_speedometer, "0", NULL, CVAR_ARCHIVE )
163163
XCVAR_DEF( ui_headCount, "-1", NULL, CVAR_ARCHIVE|CVAR_INTERNAL|CVAR_ROM )
164-
XCVAR_DEF( ui_showAllSkins, "0", NULL, CVAR_ARCHIVE_ND )
164+
XCVAR_DEF( ui_showAllSkins, "0", UI_BuildQ3Model_List, CVAR_ARCHIVE_ND )
165165

166166
#undef XCVAR_DEF

0 commit comments

Comments
 (0)