mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix console tab autocomplete for exec and condump on pure servers, patch by Zack Middleton
This commit is contained in:
parent
48aef31d9e
commit
614f315ce8
7 changed files with 15 additions and 15 deletions
|
@ -309,7 +309,7 @@ Cmd_CompleteTxtName
|
|||
*/
|
||||
void Cmd_CompleteTxtName( char *args, int argNum ) {
|
||||
if( argNum == 2 ) {
|
||||
Field_CompleteFilename( "", "txt", qfalse );
|
||||
Field_CompleteFilename( "", "txt", qfalse, qtrue );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -911,7 +911,7 @@ static void CL_CompleteDemoName( char *args, int argNum )
|
|||
char demoExt[ 16 ];
|
||||
|
||||
Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", PROTOCOL_VERSION );
|
||||
Field_CompleteFilename( "demos", demoExt, qtrue );
|
||||
Field_CompleteFilename( "demos", demoExt, qtrue, qfalse );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -784,7 +784,7 @@ Cmd_CompleteCfgName
|
|||
*/
|
||||
void Cmd_CompleteCfgName( char *args, int argNum ) {
|
||||
if( argNum == 2 ) {
|
||||
Field_CompleteFilename( "", "cfg", qfalse );
|
||||
Field_CompleteFilename( "", "cfg", qfalse, qtrue );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3303,15 +3303,15 @@ Field_CompleteFilename
|
|||
===============
|
||||
*/
|
||||
void Field_CompleteFilename( const char *dir,
|
||||
const char *ext, qboolean stripExt )
|
||||
const char *ext, qboolean stripExt, qboolean allowNonPureFilesOnDisk )
|
||||
{
|
||||
matchCount = 0;
|
||||
shortestMatch[ 0 ] = 0;
|
||||
|
||||
FS_FilenameCompletion( dir, ext, stripExt, FindMatches );
|
||||
FS_FilenameCompletion( dir, ext, stripExt, FindMatches, allowNonPureFilesOnDisk );
|
||||
|
||||
if( !Field_Complete( ) )
|
||||
FS_FilenameCompletion( dir, ext, stripExt, PrintMatches );
|
||||
FS_FilenameCompletion( dir, ext, stripExt, PrintMatches, allowNonPureFilesOnDisk );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1862,7 +1862,7 @@ Returns a uniqued list of files that match the given criteria
|
|||
from all search paths
|
||||
===============
|
||||
*/
|
||||
char **FS_ListFilteredFiles( const char *path, const char *extension, char *filter, int *numfiles ) {
|
||||
char **FS_ListFilteredFiles( const char *path, const char *extension, char *filter, int *numfiles, qboolean allowNonPureFilesOnDisk ) {
|
||||
int nfiles;
|
||||
char **listCopy;
|
||||
char *list[MAX_FOUND_FILES];
|
||||
|
@ -1958,7 +1958,7 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, char *filt
|
|||
char *name;
|
||||
|
||||
// don't scan directories for files if we are pure or restricted
|
||||
if ( fs_numServerPaks ) {
|
||||
if ( fs_numServerPaks && !allowNonPureFilesOnDisk ) {
|
||||
continue;
|
||||
} else {
|
||||
netpath = FS_BuildOSPath( search->dir->path, search->dir->gamedir, path );
|
||||
|
@ -1995,7 +1995,7 @@ FS_ListFiles
|
|||
=================
|
||||
*/
|
||||
char **FS_ListFiles( const char *path, const char *extension, int *numfiles ) {
|
||||
return FS_ListFilteredFiles( path, extension, NULL, numfiles );
|
||||
return FS_ListFilteredFiles( path, extension, NULL, numfiles, qfalse );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2374,7 +2374,7 @@ void FS_NewDir_f( void ) {
|
|||
|
||||
Com_Printf( "---------------\n" );
|
||||
|
||||
dirnames = FS_ListFilteredFiles( "", "", filter, &ndirs );
|
||||
dirnames = FS_ListFilteredFiles( "", "", filter, &ndirs, qfalse );
|
||||
|
||||
FS_SortFileList(dirnames, ndirs);
|
||||
|
||||
|
@ -3606,13 +3606,13 @@ void FS_Flush( fileHandle_t f ) {
|
|||
}
|
||||
|
||||
void FS_FilenameCompletion( const char *dir, const char *ext,
|
||||
qboolean stripExt, void(*callback)(const char *s) ) {
|
||||
qboolean stripExt, void(*callback)(const char *s), qboolean allowNonPureFilesOnDisk ) {
|
||||
char **filenames;
|
||||
int nfiles;
|
||||
int i;
|
||||
char filename[ MAX_STRING_CHARS ];
|
||||
|
||||
filenames = FS_ListFilteredFiles( dir, ext, NULL, &nfiles );
|
||||
filenames = FS_ListFilteredFiles( dir, ext, NULL, &nfiles, allowNonPureFilesOnDisk );
|
||||
|
||||
FS_SortFileList( filenames, nfiles );
|
||||
|
||||
|
|
|
@ -715,7 +715,7 @@ void FS_Remove( const char *osPath );
|
|||
void FS_HomeRemove( const char *homePath );
|
||||
|
||||
void FS_FilenameCompletion( const char *dir, const char *ext,
|
||||
qboolean stripExt, void(*callback)(const char *s) );
|
||||
qboolean stripExt, void(*callback)(const char *s), qboolean allowNonPureFilesOnDisk );
|
||||
|
||||
const char *FS_GetCurrentGameDir(void);
|
||||
|
||||
|
@ -739,7 +739,7 @@ void Field_Clear( field_t *edit );
|
|||
void Field_AutoComplete( field_t *edit );
|
||||
void Field_CompleteKeyname( void );
|
||||
void Field_CompleteFilename( const char *dir,
|
||||
const char *ext, qboolean stripExt );
|
||||
const char *ext, qboolean stripExt, qboolean allowNonPureFilesOnDisk );
|
||||
void Field_CompleteCommand( char *cmd,
|
||||
qboolean doCommands, qboolean doCvars );
|
||||
|
||||
|
|
|
@ -1253,7 +1253,7 @@ SV_CompleteMapName
|
|||
*/
|
||||
static void SV_CompleteMapName( char *args, int argNum ) {
|
||||
if( argNum == 2 ) {
|
||||
Field_CompleteFilename( "maps", "bsp", qtrue );
|
||||
Field_CompleteFilename( "maps", "bsp", qtrue, qfalse );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue