fix a couple of serious issues molgrum reported.
fix dedicated server to integrate inside fteqcc. fix bug with jump being released. fix fteqcc always using 32bit output. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5086 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
492feafd1d
commit
c46f6a3a53
12 changed files with 158 additions and 73 deletions
|
@ -305,7 +305,6 @@ qboolean QCExternalDebuggerCommand(char *text)
|
|||
|
||||
int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int *statement, char *reason, pbool fatal)
|
||||
{
|
||||
#ifndef SERVERONLY
|
||||
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(_XBOX)
|
||||
if (isPlugin >= 2)
|
||||
{
|
||||
|
@ -318,7 +317,11 @@ int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int
|
|||
return DEBUG_TRACE_ABORT;
|
||||
return DEBUG_TRACE_OFF;
|
||||
}
|
||||
#ifdef SERVERONLY
|
||||
SV_GetConsoleCommands();
|
||||
#else
|
||||
Sys_SendKeyEvents();
|
||||
#endif
|
||||
debuggerresume = -1;
|
||||
debuggerresumeline = *line;
|
||||
if (debuggerwnd)
|
||||
|
@ -331,9 +334,21 @@ int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int
|
|||
else
|
||||
printf("qcstep \"%s\":%i\n", filename, *line);
|
||||
fflush(stdout);
|
||||
INS_UpdateGrabs(false, false);
|
||||
debuggerinstance = prinst;
|
||||
debuggerfile = filename;
|
||||
#ifdef SERVERONLY
|
||||
if (reason)
|
||||
{
|
||||
printf("Debugger triggered at \"%s\":%i, %s\n", filename, *line, reason);
|
||||
PR_StackTrace(prinst, 1);
|
||||
}
|
||||
while(debuggerresume == -1 && !wantquit)
|
||||
{
|
||||
Sleep(10);
|
||||
SV_GetConsoleCommands();
|
||||
}
|
||||
#else
|
||||
INS_UpdateGrabs(false, false);
|
||||
if (reason)
|
||||
Con_Footerf(NULL, false, "^bDebugging: %s", reason);
|
||||
else
|
||||
|
@ -359,6 +374,7 @@ int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int
|
|||
}
|
||||
}
|
||||
Con_Footerf(NULL, false, "");
|
||||
#endif
|
||||
*line = debuggerresumeline;
|
||||
debuggerinstance = NULL;
|
||||
debuggerfile = NULL;
|
||||
|
@ -367,7 +383,6 @@ int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int
|
|||
return debuggerresume;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TEXTEDITOR
|
||||
return QCLibEditor(prinst, filename, line, statement, reason, fatal);
|
||||
|
|
|
@ -327,7 +327,11 @@ void VARGS Z_FreeTags(int tag)
|
|||
#define SIZE_MAX ((size_t)-1)
|
||||
#endif
|
||||
|
||||
#ifdef USE_MSVCRT_DEBUG
|
||||
qboolean ZF_ReallocElementsNamed(void **ptr, size_t *elements, size_t newelements, size_t elementsize, const char *file, int line)
|
||||
#else
|
||||
qboolean ZF_ReallocElements(void **ptr, size_t *elements, size_t newelements, size_t elementsize)
|
||||
#endif
|
||||
{
|
||||
void *n;
|
||||
size_t oldsize;
|
||||
|
@ -340,7 +344,11 @@ qboolean ZF_ReallocElements(void **ptr, size_t *elements, size_t newelements, si
|
|||
oldsize = *elements * elementsize;
|
||||
newsize = newelements * elementsize;
|
||||
|
||||
#ifdef USE_MSVCRT_DEBUG
|
||||
n = BZ_ReallocNamed(*ptr, newsize, file, line);
|
||||
#else
|
||||
n = BZ_Realloc(*ptr, newsize);
|
||||
#endif
|
||||
if (!n)
|
||||
return false;
|
||||
if (newsize > oldsize)
|
||||
|
|
|
@ -96,6 +96,7 @@ void *VARGS Z_TagMalloc (int size, int tag);
|
|||
void VARGS Z_TagFree(void *ptr);
|
||||
void VARGS Z_FreeTags(int tag);
|
||||
qboolean ZF_ReallocElements(void **ptr, size_t *elements, size_t newelements, size_t elementsize); //returns false on error
|
||||
qboolean ZF_ReallocElementsNamed(void **ptr, size_t *elements, size_t newelements, size_t elementsize, char *file, int line); //returns false on error
|
||||
#define Z_ReallocElements(ptr,elements,newelements,elementsize) do{if (!ZF_ReallocElements(ptr,elements,newelements,elementsize))Sys_Error("Z_ReallocElements failed (%s %i)\n", __FILE__, __LINE__);}while(0) //returns false on error
|
||||
|
||||
//Big Zone: allowed to fail, doesn't clear. The expectation is a large file, rather than sensitive data structures.
|
||||
|
@ -128,6 +129,7 @@ void ZG_FreeGroup(zonegroup_t *ctx);
|
|||
#define ZF_Malloc(size) ZF_MallocNamed(size, __FILE__, __LINE__)
|
||||
#define BZF_Realloc(ptr, size) BZF_ReallocNamed(ptr, size, __FILE__, __LINE__)
|
||||
#define ZG_Malloc(ctx, size) ZG_MallocNamed(ctx, size, __FILE__, __LINE__)
|
||||
#define ZF_ReallocElements(p,e,n,s) ZF_ReallocElementsNamed(p,e,n,s,__FILE__,__LINE__)
|
||||
#endif
|
||||
#define Z_StrDup(s) strcpy(Z_Malloc(strlen(s)+1), s)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue