[quake3-commits] r1892 - in trunk/code: client qcommon server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Feb 10 14:58:20 EST 2011
Author: thilo
Date: 2011-02-10 14:58:20 -0500 (Thu, 10 Feb 2011)
New Revision: 1892
Modified:
trunk/code/client/cl_console.c
trunk/code/client/cl_main.c
trunk/code/qcommon/cmd.c
trunk/code/qcommon/common.c
trunk/code/qcommon/files.c
trunk/code/qcommon/qcommon.h
trunk/code/server/sv_ccmds.c
Log:
Fix console tab autocomplete for exec and condump on pure servers, patch by Zack Middleton
Modified: trunk/code/client/cl_console.c
===================================================================
--- trunk/code/client/cl_console.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/client/cl_console.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -309,7 +309,7 @@
*/
void Cmd_CompleteTxtName( char *args, int argNum ) {
if( argNum == 2 ) {
- Field_CompleteFilename( "", "txt", qfalse );
+ Field_CompleteFilename( "", "txt", qfalse, qtrue );
}
}
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/client/cl_main.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -911,7 +911,7 @@
char demoExt[ 16 ];
Com_sprintf( demoExt, sizeof( demoExt ), ".dm_%d", PROTOCOL_VERSION );
- Field_CompleteFilename( "demos", demoExt, qtrue );
+ Field_CompleteFilename( "demos", demoExt, qtrue, qfalse );
}
}
Modified: trunk/code/qcommon/cmd.c
===================================================================
--- trunk/code/qcommon/cmd.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/qcommon/cmd.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -784,7 +784,7 @@
*/
void Cmd_CompleteCfgName( char *args, int argNum ) {
if( argNum == 2 ) {
- Field_CompleteFilename( "", "cfg", qfalse );
+ Field_CompleteFilename( "", "cfg", qfalse, qtrue );
}
}
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/qcommon/common.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -3303,15 +3303,15 @@
===============
*/
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 );
}
/*
Modified: trunk/code/qcommon/files.c
===================================================================
--- trunk/code/qcommon/files.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/qcommon/files.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -1862,7 +1862,7 @@
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 *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 @@
=================
*/
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 @@
Com_Printf( "---------------\n" );
- dirnames = FS_ListFilteredFiles( "", "", filter, &ndirs );
+ dirnames = FS_ListFilteredFiles( "", "", filter, &ndirs, qfalse );
FS_SortFileList(dirnames, ndirs);
@@ -3606,13 +3606,13 @@
}
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 );
Modified: trunk/code/qcommon/qcommon.h
===================================================================
--- trunk/code/qcommon/qcommon.h 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/qcommon/qcommon.h 2011-02-10 19:58:20 UTC (rev 1892)
@@ -715,7 +715,7 @@
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_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 );
Modified: trunk/code/server/sv_ccmds.c
===================================================================
--- trunk/code/server/sv_ccmds.c 2011-02-10 19:37:30 UTC (rev 1891)
+++ trunk/code/server/sv_ccmds.c 2011-02-10 19:58:20 UTC (rev 1892)
@@ -1253,7 +1253,7 @@
*/
static void SV_CompleteMapName( char *args, int argNum ) {
if( argNum == 2 ) {
- Field_CompleteFilename( "maps", "bsp", qtrue );
+ Field_CompleteFilename( "maps", "bsp", qtrue, qfalse );
}
}
More information about the quake3-commits
mailing list