Skip to content

Commit

Permalink
Only show missing icons if we want to see them
Browse files Browse the repository at this point in the history
Toggling ui_showAllSkins causes the game to hitch for a moment but it's better than making it a CVAR_LATCH.
  • Loading branch information
Bucky21659 committed Apr 11, 2019
1 parent c4b2846 commit d539687
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions codemp/ui/ui_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void UI_Load( void );
void UI_LoadMenus( const char *menuFile, qboolean reset );
void UI_LoadArenas( void );
void UI_LoadForceConfig_List( void );
void UI_BuildQ3Model_List( void );

//
// ui_players.c
Expand Down
5 changes: 4 additions & 1 deletion codemp/ui/ui_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11014,6 +11014,9 @@ static qboolean bIsSkinFile(const char* dirptr, const char* skinname)
char fpath[MAX_QPATH];
int f;

if (!ui_showAllSkins.integer)
return qfalse;

//don't list non-humanoid skins... - these aren't caught by the other checks below
if (!Q_stricmpn(dirptr, "default", 7))
return qfalse;
Expand Down Expand Up @@ -11053,7 +11056,7 @@ static qboolean bIsSkinFile(const char* dirptr, const char* skinname)
PlayerModel_BuildList
=================
*/
static void UI_BuildQ3Model_List( void )
void UI_BuildQ3Model_List( void )
{
int numdirs;
int numfiles;
Expand Down
2 changes: 1 addition & 1 deletion codemp/ui/ui_xcvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,6 @@ XCVAR_DEF( cg_strafeHelper, "3008", NULL, CVAR_ARCHIVE_ND )
XCVAR_DEF( cg_stylePlayer, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( cg_speedometer, "0", NULL, CVAR_ARCHIVE )
XCVAR_DEF( ui_headCount, "-1", NULL, CVAR_ARCHIVE|CVAR_INTERNAL|CVAR_ROM )
XCVAR_DEF( ui_showAllSkins, "0", NULL, CVAR_ARCHIVE_ND )
XCVAR_DEF( ui_showAllSkins, "0", UI_BuildQ3Model_List, CVAR_ARCHIVE_ND )

#undef XCVAR_DEF

0 comments on commit d539687

Please sign in to comment.