mirror of
https://github.com/rehlds/rehlds.git
synced 2025-03-12 13:30:22 +03:00
In GCC __FUNCTION__ is not a literal and can't be concatenated: pass it as argument.
This commit is contained in:
parent
4be9edaac3
commit
54749390de
@ -63,7 +63,7 @@ void Cbuf_AddText(char *text)
|
||||
|
||||
if (cmd_text.cursize + len >= cmd_text.maxsize)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": overflow\n");
|
||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ void Cbuf_InsertText(char *text)
|
||||
|
||||
if (cmd_text.cursize + addLen >= cmd_text.maxsize)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": overflow\n");
|
||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ void Cbuf_InsertTextLines(char *text)
|
||||
|
||||
if (cmd_text.cursize + addLen + 2 >= cmd_text.maxsize)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": overflow\n");
|
||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -721,20 +721,20 @@ void Cmd_AddCommand(char *cmd_name, xcommand_t function)
|
||||
|
||||
if (host_initialized)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called after host_initialized");
|
||||
Sys_Error("%s: called after host_initialized", __FUNCTION__);
|
||||
}
|
||||
|
||||
// Check in variables list
|
||||
if (Cvar_FindVar(cmd_name) != NULL)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": \"%s\" already defined as a var\n", cmd_name);
|
||||
Con_Printf("%s: \"%s\" already defined as a var\n", __FUNCTION__, cmd_name);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this command is already defined
|
||||
if (Cmd_Exists(cmd_name))
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": \"%s\" already defined\n", cmd_name);
|
||||
Con_Printf("%s: \"%s\" already defined\n", __FUNCTION__, cmd_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -755,14 +755,14 @@ void Cmd_AddMallocCommand(char *cmd_name, xcommand_t function, int flag)
|
||||
// Check in variables list
|
||||
if (Cvar_FindVar(cmd_name) != NULL)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": \"%s\" already defined as a var\n", cmd_name);
|
||||
Con_Printf("%s: \"%s\" already defined as a var\n", __FUNCTION__, cmd_name);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this command is already defined
|
||||
if (Cmd_Exists(cmd_name))
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": \"%s\" already defined\n", cmd_name);
|
||||
Con_Printf("%s: \"%s\" already defined\n", __FUNCTION__, cmd_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1010,7 +1010,7 @@ qboolean Cmd_ForwardToServerInternal(sizebuf_t *pBuf)
|
||||
char tempData[4096];
|
||||
sizebuf_t tempBuf;
|
||||
|
||||
tempBuf.buffername = __FUNCTION__ "::tempBuf";
|
||||
tempBuf.buffername = "Cmd_ForwardToServerInternal::tempBuf";
|
||||
tempBuf.data = (byte *)tempData;
|
||||
tempBuf.maxsize = 4096;
|
||||
tempBuf.cursize = 0;
|
||||
@ -1061,7 +1061,7 @@ NOXREF int Cmd_CheckParm(char *parm)
|
||||
|
||||
if (!parm)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": NULL");
|
||||
Sys_Error("%s: NULL", __FUNCTION__);
|
||||
}
|
||||
|
||||
int c = Cmd_Argc();
|
||||
|
@ -54,7 +54,7 @@ unsigned char *Mod_DecompressVis(unsigned char *in, model_t *model)
|
||||
|
||||
if (row < 0 || row > MODEL_MAX_PVS)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": oversized model->numleafs: %i", model->numleafs);
|
||||
Sys_Error("%s: oversized model->numleafs: %i", __FUNCTION__, model->numleafs);
|
||||
}
|
||||
|
||||
CM_DecompressPVS(in, decompressed, row);
|
||||
|
@ -651,7 +651,7 @@ void MSG_WriteBitAngle(float fAngle, int numbits)
|
||||
{
|
||||
if (numbits >= 32)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Can't write bit angle with 32 bits precision\n");
|
||||
Sys_Error("%s: Can't write bit angle with 32 bits precision\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
uint32 shift = (1 << numbits);
|
||||
@ -759,7 +759,7 @@ uint32 MSG_ReadBits(int numbits)
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
if (numbits > 32) {
|
||||
Sys_Error(__FUNCTION__ ": invalid numbits %d\n", numbits);
|
||||
Sys_Error("%s: invalid numbits %d\n", __FUNCTION__, numbits);
|
||||
}
|
||||
#endif // REHLDS_FIXES
|
||||
|
||||
@ -1243,7 +1243,7 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
||||
|
||||
if (length < 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": %i negative length on %s", length, buffername);
|
||||
Sys_Error("%s: %i negative length on %s", __FUNCTION__, length, buffername);
|
||||
}
|
||||
|
||||
if (buf->cursize + length > buf->maxsize)
|
||||
@ -1253,32 +1253,32 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
||||
{
|
||||
if (!buf->maxsize)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": tried to write to an uninitialized sizebuf_t: %s", buffername);
|
||||
Sys_Error("%s: tried to write to an uninitialized sizebuf_t: %s", __FUNCTION__, buffername);
|
||||
}
|
||||
else if (length > buf->maxsize)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": %i is > full buffer size on %s", length, buffername);
|
||||
Sys_Error("%s: %i is > full buffer size on %s", __FUNCTION__, length, buffername);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": overflow without FSB_ALLOWOVERFLOW set on %s", buffername);
|
||||
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __FUNCTION__, buffername);
|
||||
}
|
||||
}
|
||||
|
||||
if (length > buf->maxsize)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": %i is > full buffer size on %s, ignoring", length, buffername);
|
||||
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __FUNCTION__, length, buffername);
|
||||
}
|
||||
#else // REHLDS_FIXES
|
||||
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
||||
{
|
||||
if (!buf->maxsize)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Tried to write to an uninitialized sizebuf_t: %s", buffername);
|
||||
Sys_Error("%s: Tried to write to an uninitialized sizebuf_t: %s", __FUNCTION__, buffername);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": overflow without FSB_ALLOWOVERFLOW set on %s", buffername);
|
||||
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __FUNCTION__, buffername);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1286,14 +1286,14 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
||||
{
|
||||
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": %i is > full buffer size on %s", length, buffername);
|
||||
Sys_Error("%s: %i is > full buffer size on %s", __FUNCTION__, length, buffername);
|
||||
}
|
||||
|
||||
Con_DPrintf(__FUNCTION__ ": %i is > full buffer size on %s, ignoring", length, buffername);
|
||||
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __FUNCTION__, length, buffername);
|
||||
}
|
||||
#endif // REHLDS_FIXES
|
||||
|
||||
Con_Printf(__FUNCTION__ ": overflow on %s\n", buffername);
|
||||
Con_Printf("%s: overflow on %s\n", __FUNCTION__, buffername);
|
||||
|
||||
SZ_Clear(buf);
|
||||
buf->flags |= SIZEBUF_OVERFLOWED;
|
||||
@ -1874,13 +1874,13 @@ NOXREF void COM_WriteFile(char *filename, void *data, int len)
|
||||
|
||||
if (fp)
|
||||
{
|
||||
Sys_Printf(__FUNCTION__ ": %s\n", path);
|
||||
Sys_Printf("%s: %s\n", __FUNCTION__, path);
|
||||
FS_Write(data, len, 1, fp);
|
||||
FS_Close(fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Printf(__FUNCTION__ ": failed on %s\n", path);
|
||||
Sys_Printf("%s: failed on %s\n", __FUNCTION__, path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2050,7 +2050,7 @@ unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength
|
||||
#ifdef REHLDS_FIXES
|
||||
FS_Close(hFile);
|
||||
#endif
|
||||
Sys_Error(__FUNCTION__ ": bad usehunk");
|
||||
Sys_Error("%s: bad usehunk", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (!buf)
|
||||
@ -2058,7 +2058,7 @@ unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength
|
||||
#ifdef REHLDS_FIXES
|
||||
FS_Close(hFile);
|
||||
#endif
|
||||
Sys_Error(__FUNCTION__ ": not enough space for %s", path);
|
||||
Sys_Error("%s: not enough space for %s", __FUNCTION__, path);
|
||||
}
|
||||
|
||||
FS_Read(buf, len, 1, hFile);
|
||||
@ -2129,7 +2129,7 @@ NOXREF unsigned char *COM_LoadFileLimit(char *path, int pos, int cbmax, int *pcb
|
||||
#ifdef REHLDS_FIXES
|
||||
FS_Close(hFile);
|
||||
#endif
|
||||
Sys_Error(__FUNCTION__ ": invalid seek position for %s", path);
|
||||
Sys_Error("%s: invalid seek position for %s", __FUNCTION__, path);
|
||||
}
|
||||
|
||||
FS_Seek(hFile, pos, FILESYSTEM_SEEK_HEAD);
|
||||
@ -2152,7 +2152,7 @@ NOXREF unsigned char *COM_LoadFileLimit(char *path, int pos, int cbmax, int *pcb
|
||||
#ifdef REHLDS_FIXES
|
||||
FS_Close(hFile);
|
||||
#endif
|
||||
Sys_Error(__FUNCTION__ ": not enough space for %s", path);
|
||||
Sys_Error("%s: not enough space for %s", __FUNCTION__, path);
|
||||
}
|
||||
|
||||
FS_Close(hFile);
|
||||
|
@ -309,7 +309,7 @@ void Cvar_Set(const char *var_name, const char *value)
|
||||
|
||||
if (!var)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": variable \"%s\" not found\n", var_name);
|
||||
Con_DPrintf("%s: variable \"%s\" not found\n", __FUNCTION__, var_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ void EXT_FUNC Cvar_RegisterVariable(cvar_t *variable)
|
||||
|
||||
if (Cmd_Exists(variable->name))
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": \"%s\" is a command\n", variable->name);
|
||||
Con_Printf("%s: \"%s\" is a command\n", __FUNCTION__, variable->name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -725,7 +725,7 @@ qboolean Draw_ValidateCustomLogo(cachewad_t *wad, unsigned char *data, lumpinfo_
|
||||
|
||||
if (wad->cacheExtra != DECAL_EXTRASIZE)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Bad cached wad %s\n", wad->name);
|
||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -754,20 +754,20 @@ qboolean Draw_ValidateCustomLogo(cachewad_t *wad, unsigned char *data, lumpinfo_
|
||||
|| (tmp.offsets[0] + pix != tmp.offsets[1])
|
||||
|| paloffset != tmp.offsets[2] || palettesize != tmp.offsets[3])
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Bad cached wad %s\n", wad->name);
|
||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (nPalleteCount > 256)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Bad cached wad palette size %i on %s\n", nPalleteCount, wad->name);
|
||||
Con_Printf("%s: Bad cached wad palette size %i on %s\n", __FUNCTION__, nPalleteCount, wad->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
nSize = pixoffset + LittleLong(tmp.offsets[0]) + 3 * nPalleteCount + 2;
|
||||
if (nSize > lump->disksize)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Bad cached wad %s\n", wad->name);
|
||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ delta_description_t *DELTA_FindField(delta_t *pFields, const char *pszField)
|
||||
}
|
||||
}
|
||||
|
||||
Con_Printf(__FUNCTION__ ": Warning, couldn't find %s\n", pszField);
|
||||
Con_Printf("%s: Warning, couldn't find %s\n", __FUNCTION__, pszField);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ int EXT_FUNC DELTA_FindFieldIndex(struct delta_s *pFields, const char *fieldname
|
||||
}
|
||||
}
|
||||
|
||||
Con_Printf(__FUNCTION__ ": Warning, couldn't find %s\n", fieldname);
|
||||
Con_Printf("%s: Warning, couldn't find %s\n", __FUNCTION__, fieldname);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ int DELTA_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Con_Printf(__FUNCTION__ ": Bad field type %i\n", fieldType);
|
||||
Con_Printf("%s: Bad field type %i\n", __FUNCTION__, fieldType);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ void DELTA_MarkSendFields(unsigned char *from, unsigned char *to, delta_t *pFiel
|
||||
pTest->flags |= FDT_MARK;
|
||||
break;
|
||||
default:
|
||||
Con_Printf(__FUNCTION__ ": Bad field type %i\n", fieldType);
|
||||
Con_Printf("%s: Bad field type %i\n", __FUNCTION__, fieldType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -715,7 +715,7 @@ void DELTA_WriteMarkedFields(unsigned char *from, unsigned char *to, delta_t *pF
|
||||
MSG_WriteBitString((const char *)&to[pTest->fieldOffset]);
|
||||
break;
|
||||
default:
|
||||
Con_Printf(__FUNCTION__ ": unknown send field type\n");
|
||||
Con_Printf("%s: unknown send field type\n", __FUNCTION__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -843,7 +843,7 @@ int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
||||
Q_strcpy((char *)&to[pTest->fieldOffset], (char *)&from[pTest->fieldOffset]);
|
||||
break;
|
||||
default:
|
||||
Con_Printf(__FUNCTION__ ": unparseable field type %i\n", fieldType);
|
||||
Con_Printf("%s: unparseable field type %i\n", __FUNCTION__, fieldType);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -985,7 +985,7 @@ int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
||||
} while (c);
|
||||
break;
|
||||
default:
|
||||
Con_Printf(__FUNCTION__ ": unparseable field type %i\n", fieldType);
|
||||
Con_Printf("%s: unparseable field type %i\n", __FUNCTION__, fieldType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1085,7 +1085,7 @@ delta_t *DELTA_BuildFromLinks(delta_link_t **pplinks)
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
if (count > DELTA_MAX_FIELDS)
|
||||
Sys_Error(__FUNCTION__ ": Too many fields in delta description %i (MAX %i)\n", count, DELTA_MAX_FIELDS);
|
||||
Sys_Error("%s: Too many fields in delta description %i (MAX %i)\n", __FUNCTION__, count, DELTA_MAX_FIELDS);
|
||||
#endif
|
||||
|
||||
pdesc = (delta_description_t *)Mem_ZeroMalloc(sizeof(delta_description_t) * count);
|
||||
@ -1116,7 +1116,7 @@ int DELTA_FindOffset(int count, delta_definition_t *pdef, char *fieldname)
|
||||
}
|
||||
}
|
||||
|
||||
Sys_Error(__FUNCTION__ ": Couldn't find offset for %s!!!\n", fieldname);
|
||||
Sys_Error("%s: Couldn't find offset for %s!!!\n", __FUNCTION__, fieldname);
|
||||
}
|
||||
|
||||
qboolean DELTA_ParseType(delta_description_t *pdelta, char **pstream)
|
||||
@ -1150,11 +1150,11 @@ qboolean DELTA_ParseType(delta_description_t *pdelta, char **pstream)
|
||||
else if (!Q_stricmp(com_token, "DT_STRING"))
|
||||
pdelta->fieldType |= DT_STRING;
|
||||
else
|
||||
Sys_Error(__FUNCTION__ ": Unknown type or type flag %s\n", com_token);
|
||||
Sys_Error("%s: Unknown type or type flag %s\n", __FUNCTION__, com_token);
|
||||
}
|
||||
|
||||
// We are hit the end of the stream
|
||||
Sys_Error(__FUNCTION__ ": Expecting fieldtype info\n"); // Was Con_Printf here
|
||||
Sys_Error("%s: Expecting fieldtype info\n", __FUNCTION__); // Was Con_Printf here
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1167,7 +1167,7 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link
|
||||
{
|
||||
if (Q_stricmp(com_token, "DEFINE_DELTA_POST"))
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting DEFINE_*, got %s\n", com_token);
|
||||
Sys_Error("%s: Expecting DEFINE_*, got %s\n", __FUNCTION__, com_token);
|
||||
}
|
||||
readpost = 1;
|
||||
}
|
||||
@ -1175,13 +1175,13 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link
|
||||
*pstream = COM_Parse(*pstream);
|
||||
if (Q_stricmp(com_token, "("))
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting (, got %s\n", com_token);
|
||||
Sys_Error("%s: Expecting (, got %s\n", __FUNCTION__, com_token);
|
||||
}
|
||||
|
||||
*pstream = COM_Parse(*pstream);
|
||||
if (com_token[0] == 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting fieldname\n");
|
||||
Sys_Error("%s: Expecting fieldname\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
Q_strncpy(pField->delta->fieldName, com_token, 31);
|
||||
@ -1215,7 +1215,7 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link
|
||||
*pstream = COM_Parse(*pstream);
|
||||
if (Q_stricmp(com_token, ")"))
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting ), got %s\n", com_token); // Was Con_Printf here
|
||||
Sys_Error("%s: Expecting ), got %s\n", __FUNCTION__, com_token); // Was Con_Printf here
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1309,7 +1309,7 @@ void DELTA_SkipDescription(char **pstream)
|
||||
*pstream = COM_Parse(*pstream);
|
||||
if (com_token[0] == 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Error during description skip");
|
||||
Sys_Error("%s: Error during description skip", __FUNCTION__);
|
||||
}
|
||||
} while (Q_stricmp(com_token, "}"));
|
||||
}
|
||||
@ -1363,13 +1363,13 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
||||
|
||||
if (!ppdesc)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called with no delta_description_t\n");
|
||||
Sys_Error("%s: called with no delta_description_t\n", __FUNCTION__);
|
||||
}
|
||||
*ppdesc = 0;
|
||||
|
||||
if (!pstream)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called with no data stream\n");
|
||||
Sys_Error("%s: called with no data stream\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
while (true)
|
||||
@ -1389,14 +1389,14 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
||||
pdefinition = DELTA_FindDefinition(com_token, &count);
|
||||
if (!pdefinition)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Unknown data type: %s\n", com_token);
|
||||
Sys_Error("%s: Unknown data type: %s\n", __FUNCTION__, com_token);
|
||||
}
|
||||
|
||||
// Parse source of conditional encoder
|
||||
pstream = COM_Parse(pstream);
|
||||
if (com_token[0] == 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Unknown encoder : %s\nValid values:\nnone\ngamedll funcname\nclientdll funcname\n", com_token);
|
||||
Sys_Error("%s: Unknown encoder : %s\nValid values:\nnone\ngamedll funcname\nclientdll funcname\n", __FUNCTION__, com_token);
|
||||
}
|
||||
if (Q_stricmp(com_token, "none"))
|
||||
{
|
||||
@ -1407,7 +1407,7 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
||||
pstream = COM_Parse(pstream);
|
||||
if (com_token[0] == 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting encoder\n");
|
||||
Sys_Error("%s: Expecting encoder\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
Q_strncpy(encoder, com_token, sizeof(encoder)-1);
|
||||
@ -1428,7 +1428,7 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
||||
}
|
||||
if (Q_stricmp(com_token, "{"))
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Expecting {, got %s\n", com_token); // Was Con_Printf here
|
||||
Sys_Error("%s: Expecting {, got %s\n", __FUNCTION__, com_token); // Was Con_Printf here
|
||||
return FALSE;
|
||||
}
|
||||
if (!DELTA_ParseOneField(&pstream, &links, count, pdefinition))
|
||||
@ -1459,7 +1459,7 @@ qboolean DELTA_Load(char *name, delta_t **ppdesc, char *pszFile)
|
||||
pbuf = (char *)COM_LoadFile(pszFile, 5, 0);
|
||||
if (!pbuf)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Couldn't load file %s\n", pszFile);
|
||||
Sys_Error("%s: Couldn't load file %s\n", __FUNCTION__, pszFile);
|
||||
}
|
||||
|
||||
bret = DELTA_ParseDescription(name, ppdesc, pbuf);
|
||||
|
@ -30,7 +30,7 @@ unsigned int DELTAJIT_GetFieldSize(delta_description_t* desc) {
|
||||
return 0;
|
||||
|
||||
default:
|
||||
Sys_Error(__FUNCTION__ ": Unknown delta field type %d", desc->fieldType);
|
||||
Sys_Error("%s: Unknown delta field type %d", __FUNCTION__, desc->fieldType);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -56,11 +56,11 @@ void DELTAJIT_CreateDescription(delta_t* delta, deltajitdata_t &jitdesc) {
|
||||
|
||||
// sanity checks & pre-clean
|
||||
if (numMemBlocks > DELTAJIT_MAX_BLOCKS) {
|
||||
Sys_Error(__FUNCTION__ ": numMemBlocks > DELTAJIT_MAX_BLOCKS (%d > %d)", numMemBlocks, DELTAJIT_MAX_BLOCKS);
|
||||
Sys_Error("%s: numMemBlocks > DELTAJIT_MAX_BLOCKS (%d > %d)", __FUNCTION__, numMemBlocks, DELTAJIT_MAX_BLOCKS);
|
||||
}
|
||||
|
||||
if (delta->fieldCount > DELTAJIT_MAX_FIELDS) {
|
||||
Sys_Error(__FUNCTION__ ": fieldCount > DELTAJIT_MAX_FIELDS (%d > %d)", delta->fieldCount, DELTAJIT_MAX_FIELDS);
|
||||
Sys_Error("%s: fieldCount > DELTAJIT_MAX_FIELDS (%d > %d)", __FUNCTION__, delta->fieldCount, DELTAJIT_MAX_FIELDS);
|
||||
}
|
||||
|
||||
Q_memset(&jitdesc, 0, sizeof(jitdesc));
|
||||
|
@ -40,7 +40,7 @@ char* Ed_StrPool_Alloc(const char* origStr) {
|
||||
unsigned int len = Q_strlen(origStr) + 1;
|
||||
|
||||
if (len >= ARRAYSIZE(str)) {
|
||||
Sys_Error(__FUNCTION__ ": Too long string allocated: %s", origStr);
|
||||
Sys_Error("%s: Too long string allocated: %s", __FUNCTION__, origStr);
|
||||
}
|
||||
|
||||
Q_strcpy(str, origStr);
|
||||
|
@ -422,7 +422,7 @@ void HPAK_RemoveLump(char *pakname, resource_t *pResource)
|
||||
|
||||
if (pakname == NULL || *pakname == '\0' || pResource == NULL)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Invalid arguments\n");
|
||||
Con_Printf("%s: Invalid arguments\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
HPAK_FlushHostQueue();
|
||||
|
@ -105,7 +105,7 @@ NOXREF void Host_EndGame(const char *message, ...)
|
||||
Q_vsnprintf(string, sizeof(string), message, argptr);
|
||||
va_end(argptr);
|
||||
|
||||
Con_DPrintf(__FUNCTION__ ": %s\n", string);
|
||||
Con_DPrintf("%s: %s\n", __FUNCTION__, string);
|
||||
|
||||
oldn = g_pcls.demonum;
|
||||
|
||||
@ -116,7 +116,7 @@ NOXREF void Host_EndGame(const char *message, ...)
|
||||
|
||||
if (!g_pcls.state)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": %s\n", string);
|
||||
Sys_Error("%s: %s\n", __FUNCTION__, string);
|
||||
}
|
||||
|
||||
if (oldn != -1)
|
||||
@ -142,7 +142,7 @@ void NORETURN Host_Error(const char *error, ...)
|
||||
va_start(argptr, error);
|
||||
|
||||
if (inerror)
|
||||
Sys_Error(__FUNCTION__ ": recursively entered");
|
||||
Sys_Error("%s: recursively entered", __FUNCTION__);
|
||||
|
||||
inerror = TRUE;
|
||||
SCR_EndLoadingPlaque();
|
||||
@ -152,7 +152,7 @@ void NORETURN Host_Error(const char *error, ...)
|
||||
if (g_psv.active && developer.value != 0.0 )
|
||||
CL_WriteMessageHistory(0, 0);
|
||||
|
||||
Con_Printf(__FUNCTION__ ": %s\n", string);
|
||||
Con_Printf("%s: %s\n", __FUNCTION__, string);
|
||||
if (g_psv.active)
|
||||
Host_ShutdownServer(FALSE);
|
||||
|
||||
@ -163,7 +163,7 @@ void NORETURN Host_Error(const char *error, ...)
|
||||
inerror = FALSE;
|
||||
longjmp(host_abortserver, 1);
|
||||
}
|
||||
Sys_Error(__FUNCTION__ ": %s\n", string);
|
||||
Sys_Error("%s: %s\n", __FUNCTION__, string);
|
||||
}
|
||||
|
||||
void Host_InitLocal(void)
|
||||
|
@ -68,14 +68,14 @@ void* EXT_FUNC Mod_Extradata(model_t *mod)
|
||||
|
||||
if (mod->type == mod_brush)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called with mod_brush!\n");
|
||||
Sys_Error("%s: called with mod_brush!\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
Mod_LoadModel(mod, 1, 0);
|
||||
|
||||
if (mod->cache.data == NULL)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": caching failed");
|
||||
Sys_Error("%s: caching failed", __FUNCTION__);
|
||||
}
|
||||
|
||||
return mod->cache.data;
|
||||
@ -88,7 +88,7 @@ mleaf_t *Mod_PointInLeaf(vec_t *p, model_t *model)
|
||||
mplane_t *plane;
|
||||
|
||||
if (!model || !model->nodes)
|
||||
Sys_Error(__FUNCTION__ ": bad model");
|
||||
Sys_Error("%s: bad model", __FUNCTION__);
|
||||
|
||||
node = model->nodes;
|
||||
while (node->contents >= 0)
|
||||
@ -1039,7 +1039,7 @@ void Mod_LoadLeafs(lump_t *l)
|
||||
|
||||
if (row < 0 || row > MODEL_MAX_PVS)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": oversized loadmodel->numleafs: %i", loadmodel->numleafs);
|
||||
Sys_Error("%s: oversized loadmodel->numleafs: %i", __FUNCTION__, loadmodel->numleafs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1415,7 +1415,7 @@ void *Mod_LoadAliasGroup(void *pin, int *pframeindex, int numv, trivertx_t *pbbo
|
||||
*poutintervals = LittleFloat(pin_intervals->interval);
|
||||
|
||||
if (*poutintervals <= 0.0f)
|
||||
Sys_Error(__FUNCTION__ ": interval<=0");
|
||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
||||
|
||||
poutintervals++;
|
||||
pin_intervals++;
|
||||
@ -1441,7 +1441,7 @@ void *Mod_LoadAliasSkin(void *pin, int *pskinindex, int skinsize, aliashdr_t *ph
|
||||
if (r_pixbytes == 1)
|
||||
Q_memcpy(pskin, pinskin, skinsize);
|
||||
else if (r_pixbytes != 2)
|
||||
Sys_Error(__FUNCTION__ ": driver set invalid r_pixbytes: %d\n", r_pixbytes);
|
||||
Sys_Error("%s: driver set invalid r_pixbytes: %d\n", __FUNCTION__, r_pixbytes);
|
||||
|
||||
return (void *)&pinskin[skinsize];
|
||||
}
|
||||
@ -1471,7 +1471,7 @@ void *Mod_LoadAliasSkinGroup(void *pin, int *pskinindex, int skinsize, aliashdr_
|
||||
*poutskinintervals = LittleFloat(pinskinintervals->interval);
|
||||
|
||||
if (*poutskinintervals <= 0.0f)
|
||||
Sys_Error(__FUNCTION__ ": interval<=0");
|
||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
||||
|
||||
poutskinintervals++;
|
||||
pinskinintervals++;
|
||||
@ -1564,7 +1564,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
||||
numframes = pmodel->numframes;
|
||||
|
||||
if ((pmodel->skinwidth % 4) != 0)
|
||||
Sys_Error(__FUNCTION__ ": skinwidth not multiple of 4");
|
||||
Sys_Error("%s: skinwidth not multiple of 4", __FUNCTION__);
|
||||
|
||||
pheader->model = (byte *)pmodel - (byte *)pheader;
|
||||
|
||||
@ -1572,7 +1572,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
||||
skinsize = pmodel->skinwidth * pmodel->skinheight;
|
||||
|
||||
if (numskins < 1)
|
||||
Sys_Error(__FUNCTION__ ": Invalid # of skins: %d\n", numskins);
|
||||
Sys_Error("%s: Invalid # of skins: %d\n", __FUNCTION__, numskins);
|
||||
|
||||
pskintype = (daliasskintype_t *)(pinmodel + 1);
|
||||
pskindesc = (maliasskindesc_t *)Hunk_AllocName(sizeof(maliasskindesc_t) * numskins, loadname);
|
||||
@ -1619,7 +1619,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
||||
|
||||
// load the frames
|
||||
if (numframes < 1)
|
||||
Sys_Error(__FUNCTION__ ": Invalid # of frames: %d\n", numframes);
|
||||
Sys_Error("%s: Invalid # of frames: %d\n", __FUNCTION__, numframes);
|
||||
|
||||
pframetype = (daliasframetype_t *)(pintriangles + pmodel->numtris);
|
||||
for (i = 0; i < numframes; i++)
|
||||
@ -1747,7 +1747,7 @@ void *Mod_LoadSpriteGroup(void *pin, mspriteframe_t **ppframe)
|
||||
{
|
||||
*poutintervals = LittleFloat(pin_intervals->interval);
|
||||
if (*poutintervals <= 0.0f)
|
||||
Sys_Error(__FUNCTION__ ": interval<=0");
|
||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
||||
|
||||
poutintervals++;
|
||||
pin_intervals++;
|
||||
@ -1815,7 +1815,7 @@ void Mod_LoadSpriteModel(model_t *mod, void *buffer)
|
||||
// load the frames
|
||||
//
|
||||
if (numframes < 1)
|
||||
Sys_Error(__FUNCTION__ ": Invalid # of frames: %d\n", numframes);
|
||||
Sys_Error("%s: Invalid # of frames: %d\n", __FUNCTION__, numframes);
|
||||
|
||||
mod->numframes = numframes;
|
||||
mod->flags = 0;
|
||||
@ -1914,7 +1914,7 @@ model_t *Mod_Handle(int modelindex)
|
||||
{
|
||||
#ifdef REHLDS_FIXES
|
||||
if (modelindex < 0 || modelindex > MAX_MODELS - 1) {
|
||||
Sys_Error(__FUNCTION__ ": bad modelindex #%i\n", modelindex);
|
||||
Sys_Error("%s: bad modelindex #%i\n", __FUNCTION__, modelindex);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -62,7 +62,7 @@ void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list)
|
||||
|
||||
if (list == nullptr)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Asked to unlink fragment from empty list, ignored\n");
|
||||
Con_Printf("%s: Asked to unlink fragment from empty list, ignored\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list)
|
||||
search = search->next;
|
||||
}
|
||||
|
||||
Con_Printf(__FUNCTION__ ": Couldn't find fragment\n");
|
||||
Con_Printf("%s: Couldn't find fragment\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
void Netchan_OutOfBand(netsrc_t sock, netadr_t adr, int length, byte *data)
|
||||
@ -167,7 +167,7 @@ void Netchan_Clear(netchan_t *chan)
|
||||
|
||||
if (chan->reliable_length)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": reliable length not 0, reliable_sequence: %d, incoming_reliable_acknowledged: %d\n", chan->reliable_length, chan->incoming_reliable_acknowledged);
|
||||
Con_DPrintf("%s: reliable length not 0, reliable_sequence: %d, incoming_reliable_acknowledged: %d\n", __FUNCTION__, chan->reliable_length, chan->incoming_reliable_acknowledged);
|
||||
chan->reliable_sequence ^= 1;
|
||||
chan->reliable_length = 0;
|
||||
}
|
||||
@ -1158,7 +1158,7 @@ void Netchan_CreateFileFragmentsFromBuffer(qboolean server, netchan_t *chan, con
|
||||
if (server)
|
||||
SV_DropClient(host_client, 0, "Malloc problem");
|
||||
else
|
||||
rehlds_syserror(__FUNCTION__ "Reverse me: client-side code");
|
||||
rehlds_syserror("%s:Reverse me: client-side code", __FUNCTION__);
|
||||
|
||||
#ifdef REHLDS_FIXES
|
||||
if (bCompressed) {
|
||||
@ -1358,7 +1358,7 @@ int Netchan_CreateFileFragments_(qboolean server, netchan_t *chan, const char *f
|
||||
}
|
||||
else
|
||||
{
|
||||
rehlds_syserror(__FUNCTION__ ": Reverse clientside code");
|
||||
rehlds_syserror("%s: Reverse clientside code", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ void NET_TransferRawData(sizebuf_t *msg, unsigned char *pStart, int nSize)
|
||||
#ifdef REHLDS_CHECKS
|
||||
if (msg->maxsize < nSize)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": data size is bigger than sizebuf maxsize");
|
||||
Sys_Error("%s: data size is bigger than sizebuf maxsize", __FUNCTION__);
|
||||
}
|
||||
#endif // REHLDS_CHECKS
|
||||
Q_memcpy(msg->data, pStart, nSize);
|
||||
@ -638,7 +638,7 @@ void NET_SendLoopPacket(netsrc_t sock, int length, void *data, const netadr_t& t
|
||||
#ifdef REHLDS_CHECKS
|
||||
if (sizeof(loop->msgs[i].data) < length)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": data size is bigger than message storage size");
|
||||
Sys_Error("%s: data size is bigger than message storage size", __FUNCTION__);
|
||||
}
|
||||
#endif // REHLDS_CHECKS
|
||||
|
||||
@ -1466,7 +1466,7 @@ void NET_SendPacket(netsrc_t sock, int length, void *data, const netadr_t& to)
|
||||
#endif // _WIN32
|
||||
else
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad address type");
|
||||
Sys_Error("%s: bad address type", __FUNCTION__);
|
||||
}
|
||||
|
||||
NetadrToSockadr(&to, &addr);
|
||||
@ -1494,17 +1494,17 @@ void NET_SendPacket(netsrc_t sock, int length, void *data, const netadr_t& to)
|
||||
// let dedicated servers continue after errors
|
||||
if (g_pcls.state == ca_dedicated)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": ERROR: %s\n", NET_ErrorString(err));
|
||||
Con_Printf("%s: ERROR: %s\n", __FUNCTION__, NET_ErrorString(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (err == WSAEADDRNOTAVAIL || err == WSAENOBUFS)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": Warning: %s : %s\n", NET_ErrorString(err), NET_AdrToString(to));
|
||||
Con_DPrintf("%s: Warning: %s : %s\n", __FUNCTION__, NET_ErrorString(err), NET_AdrToString(to));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": ERROR: %s\n", NET_ErrorString(err));
|
||||
Sys_Error("%s: ERROR: %s\n", __FUNCTION__, NET_ErrorString(err));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1020,13 +1020,13 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
||||
int i;
|
||||
|
||||
if (!s)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(s))
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", s);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
||||
|
||||
if (s[0] == '!')
|
||||
Host_Error(__FUNCTION__ ": '%s' do not precache sentence names!", s);
|
||||
Host_Error("%s: '%s' do not precache sentence names!", __FUNCTION__, s);
|
||||
|
||||
if (g_psv.state == ss_loading)
|
||||
{
|
||||
@ -1049,8 +1049,8 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
||||
return i;
|
||||
}
|
||||
|
||||
Host_Error(__FUNCTION__ ": Sound '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.",
|
||||
Host_Error("%s: Sound '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.", __FUNCTION__,
|
||||
s, MAX_SOUNDS);
|
||||
}
|
||||
else
|
||||
@ -1062,7 +1062,7 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
||||
return i;
|
||||
}
|
||||
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", s);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
||||
}
|
||||
|
||||
// unreach
|
||||
@ -1072,10 +1072,10 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
||||
unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||
{
|
||||
if (!psz)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(psz))
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", psz);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, psz);
|
||||
|
||||
if (g_psv.state == ss_loading)
|
||||
{
|
||||
@ -1085,7 +1085,7 @@ unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||
if (!ev->filename)
|
||||
{
|
||||
if (type != 1)
|
||||
Host_Error(__FUNCTION__ ": only file type 1 supported currently\n");
|
||||
Host_Error("%s: only file type 1 supported currently\n", __FUNCTION__);
|
||||
|
||||
char szpath[MAX_PATH];
|
||||
Q_snprintf(szpath, sizeof(szpath), "%s", psz);
|
||||
@ -1094,7 +1094,7 @@ unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||
int scriptSize = 0;
|
||||
char* evScript = (char*) COM_LoadFile(szpath, 5, &scriptSize);
|
||||
if (!evScript)
|
||||
Host_Error(__FUNCTION__ ": file %s missing from server\n", psz);
|
||||
Host_Error("%s: file %s missing from server\n", __FUNCTION__, psz);
|
||||
#ifdef REHLDS_FIXES
|
||||
// Many modders don't know that the resource names passed to precache functions must be a static strings.
|
||||
// Also some metamod modules can be unloaded during the server running.
|
||||
@ -1114,7 +1114,7 @@ unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||
if (!Q_stricmp(ev->filename, psz))
|
||||
return i;
|
||||
}
|
||||
Host_Error(__FUNCTION__ ": '%s' overflow", psz);
|
||||
Host_Error("%s: '%s' overflow", __FUNCTION__, psz);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1125,7 +1125,7 @@ unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||
return i;
|
||||
}
|
||||
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", psz);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, psz);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1218,13 +1218,13 @@ void EXT_FUNC EV_Playback(int flags, const edict_t *pInvoker, unsigned short eve
|
||||
|
||||
if (eventindex < 1u || eventindex >= MAX_EVENTS)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": index out of range %i\n", eventindex);
|
||||
Con_DPrintf("%s: index out of range %i\n", __FUNCTION__, eventindex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_psv.event_precache[eventindex].pszScript)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": no event for index %i\n", eventindex);
|
||||
Con_DPrintf("%s: no event for index %i\n", __FUNCTION__, eventindex);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1355,7 +1355,7 @@ void EXT_FUNC EV_SV_Playback(int flags, int clientindex, unsigned short eventind
|
||||
return;
|
||||
|
||||
if (clientindex < 0 || clientindex >= g_psvs.maxclients)
|
||||
Host_Error(__FUNCTION__ ": Client index %i out of range\n", clientindex);
|
||||
Host_Error("%s: Client index %i out of range\n", __FUNCTION__, clientindex);
|
||||
|
||||
edict_t *pEdict = g_psvs.clients[clientindex].edict;
|
||||
EV_Playback(flags,pEdict, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2);
|
||||
@ -1391,10 +1391,10 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
||||
{
|
||||
int iOptional = 0;
|
||||
if (!s)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(s))
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", s);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
||||
|
||||
if (*s == '!')
|
||||
{
|
||||
@ -1435,8 +1435,8 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
||||
return i;
|
||||
#endif
|
||||
}
|
||||
Host_Error(__FUNCTION__ ": Model '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.",
|
||||
Host_Error("%s: Model '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.", __FUNCTION__,
|
||||
s, MAX_MODELS);
|
||||
}
|
||||
else
|
||||
@ -1452,7 +1452,7 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
||||
return i;
|
||||
#endif
|
||||
}
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", s);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1460,12 +1460,12 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
||||
int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
{
|
||||
if (!s)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(s))
|
||||
{
|
||||
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", s);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
||||
}
|
||||
|
||||
char resName[MAX_QPATH];
|
||||
@ -1490,12 +1490,12 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
}
|
||||
|
||||
if (g_psv.state != ss_loading)
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", resName);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, resName);
|
||||
|
||||
if (resCount >= ARRAYSIZE(g_rehlds_sv.precachedGenericResourceNames))
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.",
|
||||
Host_Error("%s: Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.", __FUNCTION__,
|
||||
resName, ARRAYSIZE(g_rehlds_sv.precachedGenericResourceNames));
|
||||
}
|
||||
|
||||
@ -1507,12 +1507,12 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
{
|
||||
if (!s)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(s))
|
||||
{
|
||||
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", s);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
||||
}
|
||||
|
||||
if (g_psv.state == ss_loading)
|
||||
@ -1528,8 +1528,8 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
if (!Q_stricmp(g_psv.generic_precache[i], s))
|
||||
return i;
|
||||
}
|
||||
Host_Error(__FUNCTION__ ": Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.",
|
||||
Host_Error("%s: Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
||||
"Reduce the number of brush models and/or regular models in the map to correct this.", __FUNCTION__,
|
||||
s, MAX_GENERIC);
|
||||
}
|
||||
else
|
||||
@ -1539,7 +1539,7 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
||||
if (!Q_stricmp(g_psv.generic_precache[i], s))
|
||||
return i;
|
||||
}
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", s);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
||||
}
|
||||
}
|
||||
#endif // REHLDS_FIXES
|
||||
@ -2238,56 +2238,56 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
||||
void EXT_FUNC PF_WriteByte_I(int iValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteByte(&gMsgBuffer, iValue);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteChar_I(int iValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteChar(&gMsgBuffer, iValue);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteShort_I(int iValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteShort(&gMsgBuffer, iValue);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteLong_I(int iValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteLong(&gMsgBuffer, iValue);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteAngle_I(float flValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteAngle(&gMsgBuffer, flValue);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteCoord_I(float flValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteShort(&gMsgBuffer, (int)(flValue * 8.0));
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteString_I(const char *sz)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteString(&gMsgBuffer, sz);
|
||||
}
|
||||
|
||||
void EXT_FUNC PF_WriteEntity_I(int iValue)
|
||||
{
|
||||
if (!gMsgStarted)
|
||||
Sys_Error(__FUNCTION__ ": called with no active message\n");
|
||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
||||
MSG_WriteShort(&gMsgBuffer, iValue);
|
||||
}
|
||||
|
||||
@ -2652,10 +2652,10 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
||||
int i;
|
||||
|
||||
if (!filename)
|
||||
Host_Error(__FUNCTION__ ": NULL pointer");
|
||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
||||
|
||||
if (PR_IsEmptyString(filename))
|
||||
Host_Error(__FUNCTION__ ": Bad string '%s'", filename);
|
||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, filename);
|
||||
|
||||
if (g_psv.state == ss_loading)
|
||||
{
|
||||
@ -2670,7 +2670,7 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
||||
++i;
|
||||
|
||||
if (i >= 512)
|
||||
Host_Error(__FUNCTION__ ": '%s' overflow", filename);
|
||||
Host_Error("%s: '%s' overflow", __FUNCTION__, filename);
|
||||
}
|
||||
|
||||
cnode->check_type = type;
|
||||
@ -2697,7 +2697,7 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
||||
++cnode;
|
||||
++i;
|
||||
if (i >= 512)
|
||||
Host_Error(__FUNCTION__ ": '%s' Precache can only be done in spawn functions", filename);
|
||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ edict_t *ED_Alloc(void)
|
||||
{
|
||||
if (!g_psv.max_edicts)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": no edicts yet");
|
||||
Sys_Error("%s: no edicts yet", __FUNCTION__);
|
||||
}
|
||||
Sys_Error(__FUNCTION__ ": no free edicts");
|
||||
Sys_Error("%s: no free edicts", __FUNCTION__);
|
||||
}
|
||||
|
||||
// Use new one
|
||||
@ -221,7 +221,7 @@ char *ED_ParseEdict(char *data, edict_t *ent)
|
||||
}
|
||||
if (!data)
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": EOF without closing brace");
|
||||
Host_Error("%s: EOF without closing brace", __FUNCTION__);
|
||||
}
|
||||
|
||||
Q_strncpy(keyname, com_token, ARRAYSIZE(keyname) - 1);
|
||||
@ -235,11 +235,11 @@ char *ED_ParseEdict(char *data, edict_t *ent)
|
||||
data = COM_Parse(data);
|
||||
if (!data)
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": EOF without closing brace");
|
||||
Host_Error("%s: EOF without closing brace", __FUNCTION__);
|
||||
}
|
||||
if (com_token[0] == '}')
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": closing brace without data");
|
||||
Host_Error("%s: closing brace without data", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (className != NULL && !Q_strcmp(className, com_token))
|
||||
@ -300,7 +300,7 @@ void ED_LoadFromFile(char *data)
|
||||
}
|
||||
if (com_token[0] != '{')
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": found %s when expecting {", com_token);
|
||||
Host_Error("%s: found %s when expecting {", __FUNCTION__, com_token);
|
||||
}
|
||||
|
||||
if (ent)
|
||||
@ -353,7 +353,7 @@ edict_t *EDICT_NUM(int n)
|
||||
{
|
||||
if (n < 0 || n >= g_psv.max_edicts)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad number %i", n);
|
||||
Sys_Error("%s: bad number %i", __FUNCTION__, n);
|
||||
}
|
||||
return &g_psv.edicts[n];
|
||||
}
|
||||
@ -365,7 +365,7 @@ int NUM_FOR_EDICT(const edict_t *e)
|
||||
|
||||
if (b < 0 || b >= g_psv.num_edicts)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad pointer");
|
||||
Sys_Error("%s: bad pointer", __FUNCTION__);
|
||||
}
|
||||
|
||||
return b;
|
||||
@ -397,7 +397,7 @@ bool SuckOutClassname(char *szInputStream, edict_t *pEdict)
|
||||
|
||||
if (kvd.fHandled == FALSE)
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": parse error");
|
||||
Host_Error("%s: parse error", __FUNCTION__);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -424,7 +424,7 @@ bool SuckOutClassname(char *szInputStream, edict_t *pEdict)
|
||||
|
||||
if (kvd.fHandled == FALSE)
|
||||
{
|
||||
Host_Error(__FUNCTION__ ": parse error");
|
||||
Host_Error("%s: parse error", __FUNCTION__);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -525,7 +525,7 @@ int EXT_FUNC IndexOfEdict(const edict_t *pEdict)
|
||||
if (index < 0 || index > g_psv.max_edicts)
|
||||
#endif // REHLDS_FIXES
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad entity");
|
||||
Sys_Error("%s: bad entity", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
return index;
|
||||
|
@ -628,7 +628,7 @@ hull_t *R_StudioHull(model_t *pModel, float frame, int sequence, const vec_t *an
|
||||
if (r_cachestudio.value != 0)
|
||||
{
|
||||
#ifdef SWDS
|
||||
Sys_Error(__FUNCTION__ ": Studio state caching is not used on server");
|
||||
Sys_Error("%s: Studio state caching is not used on server", __FUNCTION__);
|
||||
#endif
|
||||
// TODO: Reverse for client-side
|
||||
}
|
||||
@ -661,7 +661,7 @@ hull_t *R_StudioHull(model_t *pModel, float frame, int sequence, const vec_t *an
|
||||
if (r_cachestudio.value != 0)
|
||||
{
|
||||
#ifdef SWDS
|
||||
Sys_Error(__FUNCTION__ ": Studio state caching is not used on server");
|
||||
Sys_Error("%s: Studio state caching is not used on server", __FUNCTION__);
|
||||
#endif
|
||||
// TODO: Reverse for client-side
|
||||
// R_AddToStudioCache(float frame,
|
||||
|
@ -327,7 +327,7 @@ delta_t *SV_LookupDelta(char *name)
|
||||
p = p->next;
|
||||
}
|
||||
|
||||
Sys_Error(__FUNCTION__ ": Couldn't find delta for %s\n", name);
|
||||
Sys_Error("%s: Couldn't find delta for %s\n", __FUNCTION__, name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -423,7 +423,7 @@ void SV_ReallocateDynamicData(void)
|
||||
{
|
||||
if (!g_psv.max_edicts)
|
||||
{
|
||||
Con_DPrintf(__FUNCTION__ ": sv.max_edicts == 0\n");
|
||||
Con_DPrintf("%s: sv.max_edicts == 0\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -784,22 +784,22 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
||||
|
||||
if (volume < 0 || volume > 255)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": volume = %i", volume);
|
||||
Con_Printf("%s: volume = %i", __FUNCTION__, volume);
|
||||
volume = (volume < 0) ? 0 : 255;
|
||||
}
|
||||
if (attenuation < 0.0f || attenuation > 4.0f)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": attenuation = %f", attenuation);
|
||||
Con_Printf("%s: attenuation = %f", __FUNCTION__, attenuation);
|
||||
attenuation = (attenuation < 0.0f) ? 0.0f : 4.0f;
|
||||
}
|
||||
if (channel < 0 || channel > 7)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": channel = %i", channel);
|
||||
Con_Printf("%s: channel = %i", __FUNCTION__, channel);
|
||||
channel = (channel < 0) ? CHAN_AUTO : CHAN_NETWORKVOICE_BASE;
|
||||
}
|
||||
if (pitch < 0 || pitch > 255)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": pitch = %i", pitch);
|
||||
Con_Printf("%s: pitch = %i", __FUNCTION__, pitch);
|
||||
pitch = (pitch < 0) ? 0 : 255;
|
||||
}
|
||||
|
||||
@ -811,7 +811,7 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
||||
sound_num = Q_atoi(sample + 1);
|
||||
if (sound_num >= CVOXFILESENTENCEMAX)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": invalid sentence number: %s", sample + 1);
|
||||
Con_Printf("%s: invalid sentence number: %s", __FUNCTION__, sample + 1);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -825,7 +825,7 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
||||
sound_num = SV_LookupSoundIndex(sample);
|
||||
if (!sound_num || !g_psv.sound_precache[sound_num])
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": %s not precached (%d)\n", sample, sound_num);
|
||||
Con_Printf("%s: %s not precached (%d)\n", __FUNCTION__, sample, sound_num);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -934,7 +934,7 @@ void SV_AddSampleToHashedLookupTable(const char *pszSample, int iSampleIndex)
|
||||
index = 0;
|
||||
|
||||
if (index == starting_index)
|
||||
Sys_Error(__FUNCTION__ ": NO FREE SLOTS IN SOUND LOOKUP TABLE");
|
||||
Sys_Error("%s: NO FREE SLOTS IN SOUND LOOKUP TABLE", __FUNCTION__);
|
||||
}
|
||||
|
||||
g_psv.sound_precache_hashedlookup[index] = iSampleIndex;
|
||||
@ -1857,7 +1857,7 @@ int EXT_FUNC SV_CheckProtocol_internal(netadr_t *adr, int nProtocol)
|
||||
{
|
||||
if (adr == NULL)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Null address\n");
|
||||
Sys_Error("%s: Null address\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (nProtocol == PROTOCOL_VERSION)
|
||||
@ -1910,7 +1910,7 @@ bool EXT_FUNC SV_CheckChallenge_api(const netadr_t &adr, int nChallengeValue) {
|
||||
int SV_CheckChallenge(netadr_t *adr, int nChallengeValue)
|
||||
{
|
||||
if (!adr)
|
||||
Sys_Error(__FUNCTION__ ": Null address\n");
|
||||
Sys_Error("%s: Null address\n", __FUNCTION__);
|
||||
|
||||
if (NET_IsLocalAddress(*adr))
|
||||
return 1;
|
||||
@ -6463,7 +6463,7 @@ void SV_BanId_f(void)
|
||||
}
|
||||
if (id == NULL)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Couldn't find #userid %u\n", search);
|
||||
Con_Printf("%s: Couldn't find #userid %u\n", __FUNCTION__, search);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -6492,7 +6492,7 @@ void SV_BanId_f(void)
|
||||
|
||||
if (id == NULL)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Couldn't resolve uniqueid %s.\n", idstring);
|
||||
Con_Printf("%s: Couldn't resolve uniqueid %s.\n", __FUNCTION__, idstring);
|
||||
Con_Printf("Usage: banid <minutes> <uniqueid or #userid> { kick }\n");
|
||||
Con_Printf("Use 0 minutes for permanent\n");
|
||||
return;
|
||||
@ -6510,7 +6510,7 @@ void SV_BanId_f(void)
|
||||
{
|
||||
if (numuserfilters >= MAX_USERFILTERS)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": User filter list is full\n");
|
||||
Con_Printf("%s: User filter list is full\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
numuserfilters++;
|
||||
@ -6797,7 +6797,7 @@ void SV_RemoveId_f(void)
|
||||
|
||||
if (!idstring[0])
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": Id string is empty!\n");
|
||||
Con_Printf("%s: Id string is empty!\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6806,7 +6806,7 @@ void SV_RemoveId_f(void)
|
||||
int slot = Q_atoi(&idstring[1]);
|
||||
if (slot <= 0 || slot > numuserfilters)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": invalid slot #%i\n", slot);
|
||||
Con_Printf("%s: invalid slot #%i\n", __FUNCTION__, slot);
|
||||
return;
|
||||
}
|
||||
slot--;
|
||||
|
@ -308,7 +308,7 @@ const char *Sys_FindFirst(const char *path, char *basename)
|
||||
{
|
||||
if (g_hfind != -1)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called without close");
|
||||
Sys_Error("%s: called without close", __FUNCTION__);
|
||||
}
|
||||
|
||||
const char *psz = FS_FindFirst(path, &g_hfind, 0);
|
||||
@ -334,7 +334,7 @@ const char *Sys_FindFirstPathID(const char *path, char *pathid)
|
||||
//const char *psz;//unused?
|
||||
if (g_hfind != -1)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": called without close");
|
||||
Sys_Error("%s: called without close", __FUNCTION__);
|
||||
}
|
||||
|
||||
return FS_FindFirst(path, &g_hfind, pathid);
|
||||
|
@ -602,7 +602,7 @@ int SV_HullPointContents(hull_t *hull, int num, const vec_t *p)
|
||||
while (i >= 0)
|
||||
{
|
||||
if (hull->firstclipnode > i || hull->lastclipnode < i)
|
||||
Sys_Error(__FUNCTION__ ": bad node number");
|
||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
||||
node = &hull->clipnodes[i];
|
||||
plane = &hull->planes[node->planenum];
|
||||
if (plane->type > 2)
|
||||
@ -753,7 +753,7 @@ qboolean SV_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons
|
||||
if (num >= 0)
|
||||
{
|
||||
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
||||
Sys_Error(__FUNCTION__ ": bad node number");
|
||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
||||
|
||||
node = &hull->clipnodes[num];
|
||||
plane = &hull->planes[hull->clipnodes[num].planenum];
|
||||
@ -893,7 +893,7 @@ qboolean SV_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, cons
|
||||
pdif = p2f - p1f;
|
||||
|
||||
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
||||
Sys_Error(__FUNCTION__ ": bad node number");
|
||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
||||
|
||||
node = &hull->clipnodes[num];
|
||||
plane = &hull->planes[hull->clipnodes[num].planenum];
|
||||
|
@ -98,19 +98,19 @@ void Z_Free(void *ptr)
|
||||
{
|
||||
if (!ptr)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": NULL pointer");
|
||||
Sys_Error("%s: NULL pointer", __FUNCTION__);
|
||||
}
|
||||
|
||||
memblock_t *block = (memblock_t *)((char *)ptr - sizeof(memblock_t));
|
||||
|
||||
if (block->id != ZONEID)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": freed a pointer without ZONEID");
|
||||
Sys_Error("%s: freed a pointer without ZONEID", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (!block->tag)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": freed a freed pointer");
|
||||
Sys_Error("%s: freed a freed pointer", __FUNCTION__);
|
||||
}
|
||||
|
||||
block->tag = 0;
|
||||
@ -154,7 +154,7 @@ void *Z_Malloc(int size)
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": failed on allocation of %i bytes", size);
|
||||
Sys_Error("%s: failed on allocation of %i bytes", __FUNCTION__, size);
|
||||
}
|
||||
|
||||
Q_memset(buf, 0, size);
|
||||
@ -168,7 +168,7 @@ void *Z_TagMalloc(int size, int tag)
|
||||
|
||||
if (tag == 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": tried to use a 0 tag");
|
||||
Sys_Error("%s: tried to use a 0 tag", __FUNCTION__);
|
||||
}
|
||||
|
||||
size += sizeof(memblock_t);
|
||||
@ -266,17 +266,17 @@ void Z_CheckHeap(void)
|
||||
|
||||
if ((byte *)block + block->size != (byte *)block->next)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": block size does not touch the next block\n");
|
||||
Sys_Error("%s: block size does not touch the next block\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (block->next->prev != block)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": next block doesn't have proper back link\n");
|
||||
Sys_Error("%s: next block doesn't have proper back link\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (!block->tag && !block->next->tag)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": two consecutive free blocks\n");
|
||||
Sys_Error("%s: two consecutive free blocks\n", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -320,12 +320,12 @@ void Hunk_Check(void)
|
||||
{
|
||||
if (h->sentinel != HUNK_SENTINEL)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": trahsed sentinel");
|
||||
Sys_Error("%s: trahsed sentinel", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad size");
|
||||
Sys_Error("%s: bad size", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -384,9 +384,9 @@ NOXREF void Hunk_Print(qboolean all)
|
||||
// run consistancy checks
|
||||
//
|
||||
if (h->sentinel != HUNK_SENTINEL)
|
||||
Sys_Error(__FUNCTION__ ": trahsed sentinal");
|
||||
Sys_Error("%s: trahsed sentinal", __FUNCTION__);
|
||||
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
||||
Sys_Error(__FUNCTION__ ": bad size");
|
||||
Sys_Error("%s: bad size", __FUNCTION__);
|
||||
|
||||
next = (hunk_t *)((byte *)h + h->size);
|
||||
count++;
|
||||
@ -429,14 +429,14 @@ void *Hunk_AllocName(int size, const char *name)
|
||||
{
|
||||
if (size < 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad size: %i", size);
|
||||
Sys_Error("%s: bad size: %i", __FUNCTION__, size);
|
||||
}
|
||||
|
||||
int totalsize = ((size + 15) & ~15) + sizeof(hunk_t);
|
||||
|
||||
if (hunk_size - hunk_high_used - hunk_low_used < totalsize)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": failed on %i bytes", totalsize);
|
||||
Sys_Error("%s: failed on %i bytes", __FUNCTION__, totalsize);
|
||||
}
|
||||
|
||||
hunk_t *h = (hunk_t *)(hunk_base + hunk_low_used);
|
||||
@ -467,7 +467,7 @@ void Hunk_FreeToLowMark(int mark)
|
||||
{
|
||||
if (mark < 0 || mark > hunk_low_used)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad mark %i", mark);
|
||||
Sys_Error("%s: bad mark %i", __FUNCTION__, mark);
|
||||
}
|
||||
|
||||
hunk_low_used = mark;
|
||||
@ -494,7 +494,7 @@ void Hunk_FreeToHighMark(int mark)
|
||||
|
||||
if (mark < 0 || mark > hunk_high_used)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad mark %i", mark);
|
||||
Sys_Error("%s: bad mark %i", __FUNCTION__, mark);
|
||||
}
|
||||
|
||||
hunk_high_used = mark;
|
||||
@ -511,7 +511,7 @@ void *Hunk_HighAllocName(int size, const char *name)
|
||||
hunk_t *h;
|
||||
if (size < 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": bad size: %i", size);
|
||||
Sys_Error("%s: bad size: %i", __FUNCTION__, size);
|
||||
}
|
||||
|
||||
if (hunk_tempactive)
|
||||
@ -524,7 +524,7 @@ void *Hunk_HighAllocName(int size, const char *name)
|
||||
|
||||
if (hunk_size - hunk_high_used - hunk_low_used < size)
|
||||
{
|
||||
Con_Printf(__FUNCTION__ ": failed on %i bytes\n", size);
|
||||
Con_Printf("%s: failed on %i bytes\n", __FUNCTION__, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -675,7 +675,7 @@ void Cache_UnlinkLRU(cache_system_t *cs)
|
||||
{
|
||||
if (!cs->lru_next || !cs->lru_prev)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": NULL link");
|
||||
Sys_Error("%s: NULL link", __FUNCTION__);
|
||||
}
|
||||
|
||||
cs->lru_next->lru_prev = cs->lru_prev;
|
||||
@ -687,7 +687,7 @@ void Cache_MakeLRU(cache_system_t *cs)
|
||||
{
|
||||
if (cs->lru_next || cs->lru_prev)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": active link");
|
||||
Sys_Error("%s: active link", __FUNCTION__);
|
||||
}
|
||||
|
||||
cache_head.lru_next->lru_prev = cs;
|
||||
@ -714,7 +714,7 @@ cache_system_t *Cache_TryAlloc(int size, qboolean nobottom)
|
||||
{
|
||||
if (hunk_size - hunk_low_used - hunk_high_used < size)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": %i is greater then free hunk", size);
|
||||
Sys_Error("%s: %i is greater then free hunk", __FUNCTION__, size);
|
||||
}
|
||||
|
||||
newmem = (cache_system_t *)(hunk_base + hunk_low_used);
|
||||
@ -955,7 +955,7 @@ void Cache_Free(cache_user_t *c)
|
||||
{
|
||||
if (!c->data)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": not allocated");
|
||||
Sys_Error("%s: not allocated", __FUNCTION__);
|
||||
}
|
||||
|
||||
cache_system_t *cs = ((cache_system_t *)c->data - 1);
|
||||
@ -1012,12 +1012,12 @@ void *Cache_Alloc(cache_user_t *c, int size, char *name)
|
||||
|
||||
if (c->data)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": already allocated");
|
||||
Sys_Error("%s: already allocated", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (size <= 0)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": size %i", size);
|
||||
Sys_Error("%s: size %i", __FUNCTION__, size);
|
||||
}
|
||||
|
||||
while (true)
|
||||
@ -1036,7 +1036,7 @@ void *Cache_Alloc(cache_user_t *c, int size, char *name)
|
||||
|
||||
if (cache_head.lru_prev == &cache_head)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": out of memory");
|
||||
Sys_Error("%s: out of memory", __FUNCTION__);
|
||||
}
|
||||
|
||||
Cache_Free(cache_head.lru_prev->user);
|
||||
@ -1072,7 +1072,7 @@ void Memory_Init(void *buf, int size)
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": you must specify a size in KB after -zone");
|
||||
Sys_Error("%s: you must specify a size in KB after -zone", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -420,13 +420,13 @@ void ProcessModuleData(Module *module)
|
||||
int i = 0;
|
||||
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base;
|
||||
if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
|
||||
rehlds_syserror(__FUNCTION__ ": Invalid DOS header signature");
|
||||
rehlds_syserror("%s: Invalid DOS header signature", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew);
|
||||
if (NTHeaders->Signature != 0x4550) {
|
||||
rehlds_syserror(__FUNCTION__ ": Invalid NT header signature");
|
||||
rehlds_syserror("%s: Invalid NT header signature", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -440,7 +440,7 @@ void ProcessModuleData(Module *module)
|
||||
}
|
||||
|
||||
if (CodeSection == NULL) {
|
||||
rehlds_syserror(__FUNCTION__ ": Code section not found");
|
||||
rehlds_syserror("%s: Code section not found", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
// this was a root node
|
||||
unsigned int rootId = GetRoodNodeId(node->key);
|
||||
if (m_RootNodes[rootId] != node) {
|
||||
Sys_Error(__FUNCTION__ ": invalid root node");
|
||||
Sys_Error("%s: invalid root node", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
||||
m_DataRegion = (uint8*) sys_allocmem(DATA_REGION_SIZE);
|
||||
|
||||
if (!m_MetaRegion || !m_DataRegion) {
|
||||
Sys_Error(__FUNCTION__ ": direct allocation failed");
|
||||
Sys_Error("%s: direct allocation failed", __FUNCTION__);
|
||||
}
|
||||
|
||||
//initialize meta region header
|
||||
@ -36,7 +36,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
||||
metaPos += sizeof(recorder_state);
|
||||
|
||||
if ((metaPos - (char*)m_MetaRegion) > META_REGION_HEADER) {
|
||||
Sys_Error(__FUNCTION__ ": Meta header overflow");
|
||||
Sys_Error("%s: Meta header overflow", __FUNCTION__);
|
||||
}
|
||||
|
||||
//initialize data region header
|
||||
@ -48,7 +48,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
||||
dataPos += sizeof(data_header);
|
||||
|
||||
if ((dataPos - (char*)m_pDataHeader) > DATA_REGION_HEADER) {
|
||||
Sys_Error(__FUNCTION__ ": Data header overflow");
|
||||
Sys_Error("%s: Data header overflow", __FUNCTION__);
|
||||
}
|
||||
|
||||
InitHeadersContent();
|
||||
@ -93,7 +93,7 @@ void CRehldsFlightRecorder::MoveToStart() {
|
||||
|
||||
void CRehldsFlightRecorder::StartMessage(uint16 msg, bool entrance) {
|
||||
if (msg == 0 || msg > m_pMetaHeader->numMessages) {
|
||||
Sys_Error(__FUNCTION__ ": Invalid message id %u", msg);
|
||||
Sys_Error("%s: Invalid message id %u", __FUNCTION__, msg);
|
||||
}
|
||||
|
||||
if (entrance) {
|
||||
@ -101,7 +101,7 @@ void CRehldsFlightRecorder::StartMessage(uint16 msg, bool entrance) {
|
||||
}
|
||||
|
||||
if (m_pRecorderState->curMessage != 0) {
|
||||
Sys_Error(__FUNCTION__ ": overlapping messages");
|
||||
Sys_Error("%s: overlapping messages", __FUNCTION__);
|
||||
}
|
||||
|
||||
unsigned int sz = DATA_REGION_MAIN_SIZE - m_pRecorderState->wpos;
|
||||
@ -121,7 +121,7 @@ void CRehldsFlightRecorder::EndMessage(uint16 msg, bool entrance) {
|
||||
}
|
||||
|
||||
if (m_pRecorderState->curMessage != msg) {
|
||||
Sys_Error(__FUNCTION__ ": invalid message %u", msg);
|
||||
Sys_Error("%s: invalid message %u", __FUNCTION__, msg);
|
||||
}
|
||||
|
||||
unsigned int freeSz = DATA_REGION_MAIN_SIZE - m_pRecorderState->wpos;
|
||||
@ -131,7 +131,7 @@ void CRehldsFlightRecorder::EndMessage(uint16 msg, bool entrance) {
|
||||
|
||||
unsigned int msgSize = m_pRecorderState->wpos - m_pRecorderState->lastMsgBeginPos;
|
||||
if (msgSize > MSG_MAX_SIZE) {
|
||||
Sys_Error(__FUNCTION__ ": too big message %u; size %u", msg, msgSize);
|
||||
Sys_Error("%s: too big message %u; size %u", __FUNCTION__, msg, msgSize);
|
||||
}
|
||||
*(uint16*)(m_DataRegionPtr + m_pRecorderState->wpos) = msgSize;
|
||||
m_pRecorderState->wpos += 2;
|
||||
@ -142,13 +142,13 @@ void CRehldsFlightRecorder::EndMessage(uint16 msg, bool entrance) {
|
||||
void CRehldsFlightRecorder::CheckSize(unsigned int wantToWriteLen) {
|
||||
unsigned int msgSize = m_pRecorderState->wpos - m_pRecorderState->lastMsgBeginPos;
|
||||
if (msgSize + wantToWriteLen > MSG_MAX_SIZE) {
|
||||
Sys_Error(__FUNCTION__ ": too big message %u; size %u", m_pRecorderState->curMessage, msgSize);
|
||||
Sys_Error("%s: too big message %u; size %u", __FUNCTION__, m_pRecorderState->curMessage, msgSize);
|
||||
}
|
||||
}
|
||||
|
||||
void CRehldsFlightRecorder::WriteBuffer(const void* data, unsigned int len) {
|
||||
if (m_pRecorderState->curMessage == 0) {
|
||||
Sys_Error(__FUNCTION__ ": Could not write, invalid state");
|
||||
Sys_Error("%s: Could not write, invalid state", __FUNCTION__);
|
||||
}
|
||||
|
||||
CheckSize(len);
|
||||
@ -207,7 +207,7 @@ void CRehldsFlightRecorder::WriteDouble(double v) {
|
||||
|
||||
uint16 CRehldsFlightRecorder::RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut) {
|
||||
if (m_pMetaHeader->numMessages >= MSG_MAX_ID) {
|
||||
Sys_Error(__FUNCTION__ ": can't register message; limit exceeded");
|
||||
Sys_Error("%s: can't register message; limit exceeded", __FUNCTION__);
|
||||
}
|
||||
|
||||
uint16 msgId = ++m_pMetaHeader->numMessages;
|
||||
|
@ -79,7 +79,7 @@ private:
|
||||
template<typename T>
|
||||
void WritePrimitive(T v) {
|
||||
if (m_pRecorderState->curMessage == 0) {
|
||||
Sys_Error(__FUNCTION__ ": Could not write, invalid state");
|
||||
Sys_Error("%s: Could not write, invalid state", __FUNCTION__);
|
||||
}
|
||||
|
||||
CheckSize(sizeof(T));
|
||||
|
@ -40,11 +40,11 @@ bool AbstractHookChainRegistry::findHook(void* hookFunc) const
|
||||
void AbstractHookChainRegistry::addHook(void* hookFunc, int priority)
|
||||
{
|
||||
if (!hookFunc) {
|
||||
Sys_Error(__FUNCTION__ ": Parameter hookFunc can't be a nullptr");
|
||||
Sys_Error("%s: Parameter hookFunc can't be a nullptr", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (findHook(hookFunc)) {
|
||||
Sys_Error(__FUNCTION__ ": The same handler can't be used twice on the hookchain.");
|
||||
Sys_Error("%s: The same handler can't be used twice on the hookchain.", __FUNCTION__);
|
||||
}
|
||||
|
||||
for (auto i = 0; i < MAX_HOOKS_IN_CHAIN; i++)
|
||||
@ -63,7 +63,7 @@ void AbstractHookChainRegistry::addHook(void* hookFunc, int priority)
|
||||
}
|
||||
|
||||
if (m_NumHooks >= MAX_HOOKS_IN_CHAIN) {
|
||||
Sys_Error(__FUNCTION__ ": MAX_HOOKS_IN_CHAIN limit hit");
|
||||
Sys_Error("%s: MAX_HOOKS_IN_CHAIN limit hit", __FUNCTION__);
|
||||
}
|
||||
|
||||
m_NumHooks++;
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
IHookChainImpl(void** hooks, origfunc_t orig) : m_Hooks(hooks), m_OriginalFunc(orig)
|
||||
{
|
||||
if (orig == NULL)
|
||||
Sys_Error(__FUNCTION__ ": Non-void HookChain without original function.");
|
||||
Sys_Error("%s: Non-void HookChain without original function.", __FUNCTION__);
|
||||
}
|
||||
|
||||
virtual ~IHookChainImpl() {}
|
||||
|
@ -160,7 +160,7 @@ bool EXT_FUNC CRehldsServerStatic::IsLogActive()
|
||||
IGameClient* EXT_FUNC CRehldsServerStatic::GetClient(int id)
|
||||
{
|
||||
if (id < 0 || id >= g_psvs.maxclients)
|
||||
Sys_Error(__FUNCTION__ ": invalid id provided: %d", id);
|
||||
Sys_Error("%s: invalid id provided: %d", __FUNCTION__, id);
|
||||
|
||||
return g_GameClients[id];
|
||||
}
|
||||
@ -168,7 +168,7 @@ IGameClient* EXT_FUNC CRehldsServerStatic::GetClient(int id)
|
||||
client_t* EXT_FUNC CRehldsServerStatic::GetClient_t(int id)
|
||||
{
|
||||
if (id < 0 || id >= g_psvs.maxclients)
|
||||
Sys_Error(__FUNCTION__ ": invalid id provided: %d", id);
|
||||
Sys_Error("%s: invalid id provided: %d", __FUNCTION__, id);
|
||||
|
||||
return &g_psvs.clients[id];
|
||||
}
|
||||
@ -285,7 +285,7 @@ IGameClient* GetRehldsApiClient(client_t* cl)
|
||||
int idx = cl - g_psvs.clients;
|
||||
if (idx < 0 || idx >= g_psvs.maxclients)
|
||||
{
|
||||
Sys_Error(__FUNCTION__ ": Invalid client index %d", idx);
|
||||
Sys_Error("%s: Invalid client index %d", __FUNCTION__, idx);
|
||||
}
|
||||
|
||||
return g_GameClients[idx];
|
||||
|
Loading…
x
Reference in New Issue
Block a user