sdktools' te dump command now uses mod dir instead of game dir

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401643
This commit is contained in:
David Anderson 2007-10-22 07:54:04 +00:00
parent b302164b01
commit 00ec666f18

View File

@ -62,14 +62,27 @@ CON_COMMAND(sm_dump_teprops, "Dumps tempentity props to a file")
META_CONPRINT("Usage: sm_dump_teprops <file>\n");
return;
}
const char *arg = args.Arg(1);
FILE *fp = NULL;
if (!arg || arg[0] == '\0' || ((fp = fopen(arg, "wt")) == NULL))
if (!arg || arg[0] == '\0')
{
META_CONPRINTF("Could not open file \"%s\"\n", arg);
META_CONPRINTF("Usage: sm_dump_teprops <file>\n");
return;
}
char path[PLATFORM_MAX_PATH];
g_pSM->BuildPath(Path_Game, path, sizeof(path), "%s", arg);
FILE *fp = NULL;
if ((fp = fopen(path, "wt")) == NULL)
{
META_CONPRINTF("Could not open file \"%s\"\n", path);
return;
}
g_TEManager.DumpProps(fp);
fclose(fp);
}