mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 15:11:29 +00:00
Merge pull request #332 from jpcy/cmd-arg-completion-fixes
Misc. command argument completion fixes
This commit is contained in:
commit
05bb9da500
3 changed files with 9 additions and 3 deletions
|
@ -191,6 +191,7 @@ public:
|
|||
static void ArgCompletion_Decl( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_FileName( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_MapName( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_MapNameNoJson( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_ModelName( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_SoundName( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
static void ArgCompletion_ImageName( const idCmdArgs& args, void( *callback )( const char* s ) );
|
||||
|
@ -236,6 +237,11 @@ ID_INLINE void idCmdSystem::ArgCompletion_FileName( const idCmdArgs& args, void(
|
|||
}
|
||||
|
||||
ID_INLINE void idCmdSystem::ArgCompletion_MapName( const idCmdArgs& args, void( *callback )( const char* s ) )
|
||||
{
|
||||
cmdSystem->ArgCompletion_FolderExtension( args, callback, "maps/", true, ".map", ".json", NULL );
|
||||
}
|
||||
|
||||
ID_INLINE void idCmdSystem::ArgCompletion_MapNameNoJson( const idCmdArgs& args, void( *callback )( const char* s ) )
|
||||
{
|
||||
cmdSystem->ArgCompletion_FolderExtension( args, callback, "maps/", true, ".map", NULL );
|
||||
}
|
||||
|
|
|
@ -584,7 +584,7 @@ CONSOLE_COMMAND( exportMapToOBJ, "Convert .map file to .obj/.mtl ", idCmdSystem:
|
|||
|
||||
|
||||
|
||||
CONSOLE_COMMAND( convertMap, "Convert .map file to new map format with polygons instead of brushes ", idCmdSystem::ArgCompletion_MapName )
|
||||
CONSOLE_COMMAND( convertMap, "Convert .map file to new map format with polygons instead of brushes ", idCmdSystem::ArgCompletion_MapNameNoJson )
|
||||
{
|
||||
common->SetRefreshOnPrint( true );
|
||||
|
||||
|
@ -627,7 +627,7 @@ CONSOLE_COMMAND( convertMap, "Convert .map file to new map format with polygons
|
|||
}
|
||||
|
||||
|
||||
CONSOLE_COMMAND( convertMapToJSON, "Convert .map file to new map format with polygons instead of brushes ", idCmdSystem::ArgCompletion_MapName )
|
||||
CONSOLE_COMMAND( convertMapToJSON, "Convert .map file to new map format with polygons instead of brushes ", idCmdSystem::ArgCompletion_MapNameNoJson )
|
||||
{
|
||||
common->SetRefreshOnPrint( true );
|
||||
|
||||
|
|
|
@ -2271,7 +2271,7 @@ int idFileSystemLocal::GetFileList( const char* relativePath, const idStrList& e
|
|||
}
|
||||
|
||||
// ensure we have a path, and not just a filename containing the path
|
||||
if( rt.filename[ pathLength ] == '\0' || rt.filename[pathLength - 1] != '/' )
|
||||
if( rt.filename[ pathLength ] == '\0' || ( pathLength && rt.filename[pathLength - 1] != '/' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue