dedicated servers debugging is improved with this.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@279 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d47895df56
commit
dc559bf6df
1 changed files with 27 additions and 0 deletions
|
@ -925,6 +925,33 @@ int QCLibEditor(char *filename, int line, int nump, char **parms)
|
||||||
if (editormodal || !developer.value)
|
if (editormodal || !developer.value)
|
||||||
return line; //whoops
|
return line; //whoops
|
||||||
|
|
||||||
|
if (!qrenderer)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char buffer[8192];
|
||||||
|
char *r;
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
if (line == -1)
|
||||||
|
return -1;
|
||||||
|
COM_FOpenFile(filename, &f);
|
||||||
|
if (!f)
|
||||||
|
Con_Printf("%s - %i\n", filename, line);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (i = 0; i < line; i++)
|
||||||
|
{
|
||||||
|
fgets(buffer, sizeof(buffer), f);
|
||||||
|
}
|
||||||
|
if ((r = strchr(buffer, '\r')))
|
||||||
|
{ r[0] = '\n';r[1]='\0';}
|
||||||
|
Con_Printf("%s", buffer);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
//PF_break(NULL);
|
||||||
|
return line;
|
||||||
|
}
|
||||||
|
|
||||||
if (!strncmp(OpenEditorFile, "src/", 4))
|
if (!strncmp(OpenEditorFile, "src/", 4))
|
||||||
{
|
{
|
||||||
if (!editoractive || strcmp(OpenEditorFile+4, filename))
|
if (!editoractive || strcmp(OpenEditorFile+4, filename))
|
||||||
|
|
Loading…
Reference in a new issue