mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-05 02:00:34 +03:00
Change __FUNCTION__ into __func__.
This commit is contained in:
parent
dec8f3d094
commit
1a4b0a60b3
@ -63,7 +63,7 @@ void Cbuf_AddText(char *text)
|
|||||||
|
|
||||||
if (cmd_text.cursize + len >= cmd_text.maxsize)
|
if (cmd_text.cursize + len >= cmd_text.maxsize)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
Con_Printf("%s: overflow\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ void Cbuf_InsertText(char *text)
|
|||||||
|
|
||||||
if (cmd_text.cursize + addLen >= cmd_text.maxsize)
|
if (cmd_text.cursize + addLen >= cmd_text.maxsize)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
Con_Printf("%s: overflow\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ void Cbuf_InsertTextLines(char *text)
|
|||||||
|
|
||||||
if (cmd_text.cursize + addLen + 2 >= cmd_text.maxsize)
|
if (cmd_text.cursize + addLen + 2 >= cmd_text.maxsize)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: overflow\n", __FUNCTION__);
|
Con_Printf("%s: overflow\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -721,20 +721,20 @@ void Cmd_AddCommand(const char *cmd_name, xcommand_t function)
|
|||||||
|
|
||||||
if (host_initialized)
|
if (host_initialized)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called after host_initialized", __FUNCTION__);
|
Sys_Error("%s: called after host_initialized", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check in variables list
|
// Check in variables list
|
||||||
if (Cvar_FindVar(cmd_name) != NULL)
|
if (Cvar_FindVar(cmd_name) != NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: \"%s\" already defined as a var\n", __FUNCTION__, cmd_name);
|
Con_Printf("%s: \"%s\" already defined as a var\n", __func__, cmd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this command is already defined
|
// Check if this command is already defined
|
||||||
if (Cmd_Exists(cmd_name))
|
if (Cmd_Exists(cmd_name))
|
||||||
{
|
{
|
||||||
Con_Printf("%s: \"%s\" already defined\n", __FUNCTION__, cmd_name);
|
Con_Printf("%s: \"%s\" already defined\n", __func__, cmd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,14 +755,14 @@ void Cmd_AddMallocCommand(const char *cmd_name, xcommand_t function, int flag)
|
|||||||
// Check in variables list
|
// Check in variables list
|
||||||
if (Cvar_FindVar(cmd_name) != NULL)
|
if (Cvar_FindVar(cmd_name) != NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: \"%s\" already defined as a var\n", __FUNCTION__, cmd_name);
|
Con_Printf("%s: \"%s\" already defined as a var\n", __func__, cmd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if this command is already defined
|
// Check if this command is already defined
|
||||||
if (Cmd_Exists(cmd_name))
|
if (Cmd_Exists(cmd_name))
|
||||||
{
|
{
|
||||||
Con_Printf("%s: \"%s\" already defined\n", __FUNCTION__, cmd_name);
|
Con_Printf("%s: \"%s\" already defined\n", __func__, cmd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1010,7 +1010,7 @@ qboolean Cmd_ForwardToServerInternal(sizebuf_t *pBuf)
|
|||||||
char tempData[4096], buffername[64];
|
char tempData[4096], buffername[64];
|
||||||
sizebuf_t tempBuf;
|
sizebuf_t tempBuf;
|
||||||
|
|
||||||
Q_sprintf(buffername, "%s::%s", __FUNCTION__, nameof_variable(tempBuf));
|
Q_sprintf(buffername, "%s::%s", __func__, nameof_variable(tempBuf));
|
||||||
|
|
||||||
tempBuf.buffername = buffername;
|
tempBuf.buffername = buffername;
|
||||||
tempBuf.data = (byte *)tempData;
|
tempBuf.data = (byte *)tempData;
|
||||||
@ -1063,7 +1063,7 @@ NOXREF int Cmd_CheckParm(char *parm)
|
|||||||
|
|
||||||
if (!parm)
|
if (!parm)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: NULL", __FUNCTION__);
|
Sys_Error("%s: NULL", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
int c = Cmd_Argc();
|
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)
|
if (row < 0 || row > MODEL_MAX_PVS)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: oversized model->numleafs: %i", __FUNCTION__, model->numleafs);
|
Sys_Error("%s: oversized model->numleafs: %i", __func__, model->numleafs);
|
||||||
}
|
}
|
||||||
|
|
||||||
CM_DecompressPVS(in, decompressed, row);
|
CM_DecompressPVS(in, decompressed, row);
|
||||||
|
@ -651,7 +651,7 @@ void MSG_WriteBitAngle(float fAngle, int numbits)
|
|||||||
{
|
{
|
||||||
if (numbits >= 32)
|
if (numbits >= 32)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Can't write bit angle with 32 bits precision\n", __FUNCTION__);
|
Sys_Error("%s: Can't write bit angle with 32 bits precision\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 shift = (1 << numbits);
|
uint32 shift = (1 << numbits);
|
||||||
@ -759,7 +759,7 @@ uint32 MSG_ReadBits(int numbits)
|
|||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
if (numbits > 32) {
|
if (numbits > 32) {
|
||||||
Sys_Error("%s: invalid numbits %d\n", __FUNCTION__, numbits);
|
Sys_Error("%s: invalid numbits %d\n", __func__, numbits);
|
||||||
}
|
}
|
||||||
#endif // REHLDS_FIXES
|
#endif // REHLDS_FIXES
|
||||||
|
|
||||||
@ -1243,7 +1243,7 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
|||||||
|
|
||||||
if (length < 0)
|
if (length < 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %i negative length on %s", __FUNCTION__, length, buffername);
|
Sys_Error("%s: %i negative length on %s", __func__, length, buffername);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf->cursize + length > buf->maxsize)
|
if (buf->cursize + length > buf->maxsize)
|
||||||
@ -1253,32 +1253,32 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
|||||||
{
|
{
|
||||||
if (!buf->maxsize)
|
if (!buf->maxsize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: tried to write to an uninitialized sizebuf_t: %s", __FUNCTION__, buffername);
|
Sys_Error("%s: tried to write to an uninitialized sizebuf_t: %s", __func__, buffername);
|
||||||
}
|
}
|
||||||
else if (length > buf->maxsize)
|
else if (length > buf->maxsize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %i is > full buffer size on %s", __FUNCTION__, length, buffername);
|
Sys_Error("%s: %i is > full buffer size on %s", __func__, length, buffername);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __FUNCTION__, buffername);
|
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __func__, buffername);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length > buf->maxsize)
|
if (length > buf->maxsize)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __FUNCTION__, length, buffername);
|
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __func__, length, buffername);
|
||||||
}
|
}
|
||||||
#else // REHLDS_FIXES
|
#else // REHLDS_FIXES
|
||||||
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
||||||
{
|
{
|
||||||
if (!buf->maxsize)
|
if (!buf->maxsize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Tried to write to an uninitialized sizebuf_t: %s", __FUNCTION__, buffername);
|
Sys_Error("%s: Tried to write to an uninitialized sizebuf_t: %s", __func__, buffername);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __FUNCTION__, buffername);
|
Sys_Error("%s: overflow without FSB_ALLOWOVERFLOW set on %s", __func__, buffername);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1286,14 +1286,14 @@ void *EXT_FUNC SZ_GetSpace(sizebuf_t *buf, int length)
|
|||||||
{
|
{
|
||||||
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
if (!(buf->flags & SIZEBUF_ALLOW_OVERFLOW))
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %i is > full buffer size on %s", __FUNCTION__, length, buffername);
|
Sys_Error("%s: %i is > full buffer size on %s", __func__, length, buffername);
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __FUNCTION__, length, buffername);
|
Con_DPrintf("%s: %i is > full buffer size on %s, ignoring", __func__, length, buffername);
|
||||||
}
|
}
|
||||||
#endif // REHLDS_FIXES
|
#endif // REHLDS_FIXES
|
||||||
|
|
||||||
Con_Printf("%s: overflow on %s\n", __FUNCTION__, buffername);
|
Con_Printf("%s: overflow on %s\n", __func__, buffername);
|
||||||
|
|
||||||
SZ_Clear(buf);
|
SZ_Clear(buf);
|
||||||
buf->flags |= SIZEBUF_OVERFLOWED;
|
buf->flags |= SIZEBUF_OVERFLOWED;
|
||||||
@ -1874,13 +1874,13 @@ NOXREF void COM_WriteFile(char *filename, void *data, int len)
|
|||||||
|
|
||||||
if (fp)
|
if (fp)
|
||||||
{
|
{
|
||||||
Sys_Printf("%s: %s\n", __FUNCTION__, path);
|
Sys_Printf("%s: %s\n", __func__, path);
|
||||||
FS_Write(data, len, 1, fp);
|
FS_Write(data, len, 1, fp);
|
||||||
FS_Close(fp);
|
FS_Close(fp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Printf("%s: failed on %s\n", __FUNCTION__, path);
|
Sys_Printf("%s: failed on %s\n", __func__, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2050,7 +2050,7 @@ unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength
|
|||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: bad usehunk", __FUNCTION__);
|
Sys_Error("%s: bad usehunk", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
@ -2058,7 +2058,7 @@ unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength
|
|||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: not enough space for %s", __FUNCTION__, path);
|
Sys_Error("%s: not enough space for %s", __func__, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_Read(buf, len, 1, hFile);
|
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
|
#ifdef REHLDS_FIXES
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: invalid seek position for %s", __FUNCTION__, path);
|
Sys_Error("%s: invalid seek position for %s", __func__, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_Seek(hFile, pos, FILESYSTEM_SEEK_HEAD);
|
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
|
#ifdef REHLDS_FIXES
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: not enough space for %s", __FUNCTION__, path);
|
Sys_Error("%s: not enough space for %s", __func__, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
|
@ -133,7 +133,7 @@ byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence)
|
|||||||
CRC32_t crc;
|
CRC32_t crc;
|
||||||
|
|
||||||
if (sequence < 0)
|
if (sequence < 0)
|
||||||
Sys_Error("%s: sequence < 0\n", __FUNCTION__);
|
Sys_Error("%s: sequence < 0\n", __func__);
|
||||||
p = (byte *)pulCRCTable + sequence % 0x3FC;
|
p = (byte *)pulCRCTable + sequence % 0x3FC;
|
||||||
if (length > 60)
|
if (length > 60)
|
||||||
length = 60;
|
length = 60;
|
||||||
|
@ -309,7 +309,7 @@ void Cvar_Set(const char *var_name, const char *value)
|
|||||||
|
|
||||||
if (!var)
|
if (!var)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: variable \"%s\" not found\n", __FUNCTION__, var_name);
|
Con_DPrintf("%s: variable \"%s\" not found\n", __func__, var_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ void EXT_FUNC Cvar_RegisterVariable(cvar_t *variable)
|
|||||||
|
|
||||||
if (Cmd_Exists(variable->name))
|
if (Cmd_Exists(variable->name))
|
||||||
{
|
{
|
||||||
Con_Printf("%s: \"%s\" is a command\n", __FUNCTION__, variable->name);
|
Con_Printf("%s: \"%s\" is a command\n", __func__, variable->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void Draw_CacheWadInitFromFile(FileHandle_t hFile, int len, char *name, int cach
|
|||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: Wad file %s doesn't have WAD3 id\n", __FUNCTION__, name);
|
Sys_Error("%s: Wad file %s doesn't have WAD3 id\n", __func__, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
wad->lumps = (lumpinfo_s *)Mem_Malloc(len - header.infotableofs);
|
wad->lumps = (lumpinfo_s *)Mem_Malloc(len - header.infotableofs);
|
||||||
@ -103,7 +103,7 @@ void Draw_CacheWadInit(char *name, int cacheMax, cachewad_t *wad)
|
|||||||
int len;
|
int len;
|
||||||
FileHandle_t hFile = FS_Open(name, "rb");
|
FileHandle_t hFile = FS_Open(name, "rb");
|
||||||
if (!hFile)
|
if (!hFile)
|
||||||
Sys_Error("%s: Couldn't open %s\n", __FUNCTION__, name);
|
Sys_Error("%s: Couldn't open %s\n", __func__, name);
|
||||||
len = FS_Size(hFile);
|
len = FS_Size(hFile);
|
||||||
Draw_CacheWadInitFromFile(hFile, len, name, cacheMax, wad);
|
Draw_CacheWadInitFromFile(hFile, len, name, cacheMax, wad);
|
||||||
FS_Close(hFile);
|
FS_Close(hFile);
|
||||||
@ -180,7 +180,7 @@ void Draw_MiptexTexture(cachewad_t *wad, unsigned char *data)
|
|||||||
byte *pal;
|
byte *pal;
|
||||||
|
|
||||||
if (wad->cacheExtra != DECAL_EXTRASIZE)
|
if (wad->cacheExtra != DECAL_EXTRASIZE)
|
||||||
Sys_Error("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
Sys_Error("%s: Bad cached wad %s\n", __func__, wad->name);
|
||||||
|
|
||||||
tex = (texture_t *)data;
|
tex = (texture_t *)data;
|
||||||
mip = (miptex_t *)(data + wad->cacheExtra);
|
mip = (miptex_t *)(data + wad->cacheExtra);
|
||||||
@ -311,7 +311,7 @@ NOXREF int Draw_DecalIndex(int id)
|
|||||||
char tmp[32];
|
char tmp[32];
|
||||||
char *pName;
|
char *pName;
|
||||||
if (!decal_names[id][0])
|
if (!decal_names[id][0])
|
||||||
Sys_Error("%s: Used decal #%d without a name\n", __FUNCTION__, id);
|
Sys_Error("%s: Used decal #%d without a name\n", __func__, id);
|
||||||
|
|
||||||
pName = decal_names[id];
|
pName = decal_names[id];
|
||||||
if (!Host_IsServerActive() && violence_hblood.value == 0.0f && !Q_strncmp(pName, "{blood", 6))
|
if (!Host_IsServerActive() && violence_hblood.value == 0.0f && !Q_strncmp(pName, "{blood", 6))
|
||||||
@ -360,7 +360,7 @@ NOXREF texture_t *Draw_DecalTexture(int index)
|
|||||||
{
|
{
|
||||||
pCust = g_pcl.players[~index].customdata.pNext;
|
pCust = g_pcl.players[~index].customdata.pNext;
|
||||||
if (!pCust || !pCust->bInUse || !pCust->pInfo || !pCust->pBuffer)
|
if (!pCust || !pCust->bInUse || !pCust->pInfo || !pCust->pBuffer)
|
||||||
Sys_Error("%s: Failed to load custom decal for player #%i:%s using default decal 0.\n", __FUNCTION__, ~index, g_pcl.players[~index].name);
|
Sys_Error("%s: Failed to load custom decal for player #%i:%s using default decal 0.\n", __func__, ~index, g_pcl.players[~index].name);
|
||||||
|
|
||||||
retval = (texture_t *)Draw_CustomCacheGet((cachewad_t *)pCust->pInfo, pCust->pBuffer, pCust->resource.nDownloadSize, pCust->nUserData1);
|
retval = (texture_t *)Draw_CustomCacheGet((cachewad_t *)pCust->pInfo, pCust->pBuffer, pCust->resource.nDownloadSize, pCust->nUserData1);
|
||||||
if (!retval)
|
if (!retval)
|
||||||
@ -383,7 +383,7 @@ int Draw_CacheByIndex(cachewad_t *wad, int nIndex, int playernum)
|
|||||||
if (i == wad->cacheCount)
|
if (i == wad->cacheCount)
|
||||||
{
|
{
|
||||||
if (i == wad->cacheMax)
|
if (i == wad->cacheMax)
|
||||||
Sys_Error("%s: Cache wad (%s) out of %d entries", __FUNCTION__, wad->name, i);
|
Sys_Error("%s: Cache wad (%s) out of %d entries", __func__, wad->name, i);
|
||||||
wad->cacheCount++;
|
wad->cacheCount++;
|
||||||
Q_snprintf(pic->name, sizeof(pic->name), "%s", szTestName);
|
Q_snprintf(pic->name, sizeof(pic->name), "%s", szTestName);
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ void Decal_MergeInDecals(cachewad_t *pwad, const char *pathID)
|
|||||||
cachewad_t *final;
|
cachewad_t *final;
|
||||||
|
|
||||||
if (!pwad)
|
if (!pwad)
|
||||||
Sys_Error("%s: called with NULL wad\n", __FUNCTION__);
|
Sys_Error("%s: called with NULL wad\n", __func__);
|
||||||
|
|
||||||
lumplist = NULL;
|
lumplist = NULL;
|
||||||
if (!decal_wad)
|
if (!decal_wad)
|
||||||
@ -546,7 +546,7 @@ void Decal_Init(void)
|
|||||||
#else
|
#else
|
||||||
if (i == 0 && !hfile)
|
if (i == 0 && !hfile)
|
||||||
#endif
|
#endif
|
||||||
Sys_Error("%s: Couldn't find '%s' in \"%s\" search path\n", __FUNCTION__, "decals.wad", pszPathID[i]);
|
Sys_Error("%s: Couldn't find '%s' in \"%s\" search path\n", __func__, "decals.wad", pszPathID[i]);
|
||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
found = true;
|
found = true;
|
||||||
@ -564,7 +564,7 @@ void Decal_Init(void)
|
|||||||
|
|
||||||
sv_decalnamecount = Draw_DecalCount();
|
sv_decalnamecount = Draw_DecalCount();
|
||||||
if (sv_decalnamecount > MAX_DECALS)
|
if (sv_decalnamecount > MAX_DECALS)
|
||||||
Sys_Error("%s: Too many decals: %d / %d\n", __FUNCTION__, sv_decalnamecount, MAX_DECALS);
|
Sys_Error("%s: Too many decals: %d / %d\n", __func__, sv_decalnamecount, MAX_DECALS);
|
||||||
|
|
||||||
for (i = 0; i < sv_decalnamecount; i++)
|
for (i = 0; i < sv_decalnamecount; i++)
|
||||||
{
|
{
|
||||||
@ -615,7 +615,7 @@ NOXREF void *Draw_CacheGet(cachewad_t *wad, int index)
|
|||||||
lumpinfo_t *pLump;
|
lumpinfo_t *pLump;
|
||||||
|
|
||||||
if (index >= wad->cacheCount)
|
if (index >= wad->cacheCount)
|
||||||
Sys_Error("%s: Cache wad indexed before load %s: %d", __FUNCTION__, wad->name, index);
|
Sys_Error("%s: Cache wad indexed before load %s: %d", __func__, wad->name, index);
|
||||||
|
|
||||||
pic = wad->cache;
|
pic = wad->cache;
|
||||||
dat = Cache_Check(&pic[index].cache);
|
dat = Cache_Check(&pic[index].cache);
|
||||||
@ -640,7 +640,7 @@ NOXREF void *Draw_CacheGet(cachewad_t *wad, int index)
|
|||||||
if (Draw_CacheReload(wad, i, pLump, pic, clean, path))
|
if (Draw_CacheReload(wad, i, pLump, pic, clean, path))
|
||||||
{
|
{
|
||||||
if (pic->cache.data == NULL)
|
if (pic->cache.data == NULL)
|
||||||
Sys_Error("%s: failed to load %s", __FUNCTION__, path);
|
Sys_Error("%s: failed to load %s", __func__, path);
|
||||||
dat = pic->cache.data;
|
dat = pic->cache.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -655,7 +655,7 @@ void *Draw_CustomCacheGet(cachewad_t *wad, void *raw, int rawsize, int index)
|
|||||||
char clean[16];
|
char clean[16];
|
||||||
|
|
||||||
if (wad->cacheCount <= index)
|
if (wad->cacheCount <= index)
|
||||||
Sys_Error("%s: Cache wad indexed before load %s: %d", __FUNCTION__, wad->name, index);
|
Sys_Error("%s: Cache wad indexed before load %s: %d", __func__, wad->name, index);
|
||||||
|
|
||||||
pic = &wad->cache[index];
|
pic = &wad->cache[index];
|
||||||
pdata = Cache_Check(&pic->cache);
|
pdata = Cache_Check(&pic->cache);
|
||||||
@ -667,7 +667,7 @@ void *Draw_CustomCacheGet(cachewad_t *wad, void *raw, int rawsize, int index)
|
|||||||
if (Draw_CacheLoadFromCustom(clean, wad, raw, rawsize, pic))
|
if (Draw_CacheLoadFromCustom(clean, wad, raw, rawsize, pic))
|
||||||
{
|
{
|
||||||
if (!pic->cache.data)
|
if (!pic->cache.data)
|
||||||
Sys_Error("%s: failed to load %s", __FUNCTION__, pic->name);
|
Sys_Error("%s: failed to load %s", __func__, pic->name);
|
||||||
pdata = pic->cache.data;
|
pdata = pic->cache.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -699,7 +699,7 @@ NOXREF qboolean Draw_CacheReload(cachewad_t *wad, int i, lumpinfo_t *pLump, cach
|
|||||||
#endif // SWDS
|
#endif // SWDS
|
||||||
buf = (byte *)Cache_Alloc(&pic->cache, wad->cacheExtra + pLump->size + 1, clean);
|
buf = (byte *)Cache_Alloc(&pic->cache, wad->cacheExtra + pLump->size + 1, clean);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
Sys_Error("%s: not enough space for %s in %s", __FUNCTION__, path, wad->name);
|
Sys_Error("%s: not enough space for %s in %s", __func__, path, wad->name);
|
||||||
buf[pLump->size + wad->cacheExtra] = 0;
|
buf[pLump->size + wad->cacheExtra] = 0;
|
||||||
|
|
||||||
FS_Seek(hFile, pLump->filepos, FILESYSTEM_SEEK_HEAD);
|
FS_Seek(hFile, pLump->filepos, FILESYSTEM_SEEK_HEAD);
|
||||||
@ -726,7 +726,7 @@ qboolean Draw_ValidateCustomLogo(cachewad_t *wad, unsigned char *data, lumpinfo_
|
|||||||
|
|
||||||
if (wad->cacheExtra != DECAL_EXTRASIZE)
|
if (wad->cacheExtra != DECAL_EXTRASIZE)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
Con_Printf("%s: Bad cached wad %s\n", __func__, wad->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,20 +755,20 @@ qboolean Draw_ValidateCustomLogo(cachewad_t *wad, unsigned char *data, lumpinfo_
|
|||||||
|| (tmp.offsets[0] + pix != tmp.offsets[1])
|
|| (tmp.offsets[0] + pix != tmp.offsets[1])
|
||||||
|| paloffset != tmp.offsets[2] || palettesize != tmp.offsets[3])
|
|| paloffset != tmp.offsets[2] || palettesize != tmp.offsets[3])
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
Con_Printf("%s: Bad cached wad %s\n", __func__, wad->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nPalleteCount > 256)
|
if (nPalleteCount > 256)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Bad cached wad palette size %i on %s\n", __FUNCTION__, nPalleteCount, wad->name);
|
Con_Printf("%s: Bad cached wad palette size %i on %s\n", __func__, nPalleteCount, wad->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nSize = pixoffset + LittleLong(tmp.offsets[0]) + 3 * nPalleteCount + 2;
|
nSize = pixoffset + LittleLong(tmp.offsets[0]) + 3 * nPalleteCount + 2;
|
||||||
if (nSize > lump->disksize)
|
if (nSize > lump->disksize)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Bad cached wad %s\n", __FUNCTION__, wad->name);
|
Con_Printf("%s: Bad cached wad %s\n", __func__, wad->name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,7 +792,7 @@ qboolean Draw_CacheLoadFromCustom(char *clean, cachewad_t *wad, void *raw, int r
|
|||||||
pLump = &wad->lumps[idx];
|
pLump = &wad->lumps[idx];
|
||||||
buf = (byte *)Cache_Alloc(&pic->cache, wad->cacheExtra + pLump->size + 1, clean);
|
buf = (byte *)Cache_Alloc(&pic->cache, wad->cacheExtra + pLump->size + 1, clean);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
Sys_Error("%s: not enough space for %s in %s", __FUNCTION__, clean, wad->name);
|
Sys_Error("%s: not enough space for %s in %s", __func__, clean, wad->name);
|
||||||
|
|
||||||
buf[wad->cacheExtra + pLump->size] = 0;
|
buf[wad->cacheExtra + pLump->size] = 0;
|
||||||
Q_memcpy((char *)buf + wad->cacheExtra, (char *)raw + pLump->filepos, pLump->size);
|
Q_memcpy((char *)buf + wad->cacheExtra, (char *)raw + pLump->filepos, pLump->size);
|
||||||
@ -825,7 +825,7 @@ NOXREF int Draw_CacheIndex(cachewad_t *wad, char *path)
|
|||||||
if (i == wad->cacheCount)
|
if (i == wad->cacheCount)
|
||||||
{
|
{
|
||||||
if (wad->cacheMax == wad->cacheCount)
|
if (wad->cacheMax == wad->cacheCount)
|
||||||
Sys_Error("%s: Cache wad (%s) out of %d entries", __FUNCTION__);
|
Sys_Error("%s: Cache wad (%s) out of %d entries", __func__);
|
||||||
|
|
||||||
wad->cacheCount++;
|
wad->cacheCount++;
|
||||||
Q_strncpy(wad->name, path, 63);
|
Q_strncpy(wad->name, path, 63);
|
||||||
|
@ -326,7 +326,7 @@ delta_description_t *DELTA_FindField(delta_t *pFields, const char *pszField)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("%s: Warning, couldn't find %s\n", __FUNCTION__, pszField);
|
Con_Printf("%s: Warning, couldn't find %s\n", __func__, pszField);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ int EXT_FUNC DELTA_FindFieldIndex(struct delta_s *pFields, const char *fieldname
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("%s: Warning, couldn't find %s\n", __FUNCTION__, fieldname);
|
Con_Printf("%s: Warning, couldn't find %s\n", __func__, fieldname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ int DELTA_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("%s: Bad field type %i\n", __FUNCTION__, fieldType);
|
Con_Printf("%s: Bad field type %i\n", __func__, fieldType);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -559,7 +559,7 @@ void DELTA_MarkSendFields(unsigned char *from, unsigned char *to, delta_t *pFiel
|
|||||||
pTest->flags |= FDT_MARK;
|
pTest->flags |= FDT_MARK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("%s: Bad field type %i\n", __FUNCTION__, fieldType);
|
Con_Printf("%s: Bad field type %i\n", __func__, fieldType);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -715,7 +715,7 @@ void DELTA_WriteMarkedFields(unsigned char *from, unsigned char *to, delta_t *pF
|
|||||||
MSG_WriteBitString((const char *)&to[pTest->fieldOffset]);
|
MSG_WriteBitString((const char *)&to[pTest->fieldOffset]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("%s: unknown send field type\n", __FUNCTION__);
|
Con_Printf("%s: unknown send field type\n", __func__);
|
||||||
break;
|
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]);
|
Q_strcpy((char *)&to[pTest->fieldOffset], (char *)&from[pTest->fieldOffset]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("%s: unparseable field type %i\n", __FUNCTION__, fieldType);
|
Con_Printf("%s: unparseable field type %i\n", __func__, fieldType);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -985,7 +985,7 @@ int DELTA_ParseDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
|||||||
} while (c);
|
} while (c);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Con_Printf("%s: unparseable field type %i\n", __FUNCTION__, fieldType);
|
Con_Printf("%s: unparseable field type %i\n", __func__, fieldType);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1085,7 +1085,7 @@ delta_t *DELTA_BuildFromLinks(delta_link_t **pplinks)
|
|||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
if (count > DELTA_MAX_FIELDS)
|
if (count > DELTA_MAX_FIELDS)
|
||||||
Sys_Error("%s: Too many fields in delta description %i (MAX %i)\n", __FUNCTION__, count, DELTA_MAX_FIELDS);
|
Sys_Error("%s: Too many fields in delta description %i (MAX %i)\n", __func__, count, DELTA_MAX_FIELDS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pdesc = (delta_description_t *)Mem_ZeroMalloc(sizeof(delta_description_t) * count);
|
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("%s: Couldn't find offset for %s!!!\n", __FUNCTION__, fieldname);
|
Sys_Error("%s: Couldn't find offset for %s!!!\n", __func__, fieldname);
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean DELTA_ParseType(delta_description_t *pdelta, char **pstream)
|
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"))
|
else if (!Q_stricmp(com_token, "DT_STRING"))
|
||||||
pdelta->fieldType |= DT_STRING;
|
pdelta->fieldType |= DT_STRING;
|
||||||
else
|
else
|
||||||
Sys_Error("%s: Unknown type or type flag %s\n", __FUNCTION__, com_token);
|
Sys_Error("%s: Unknown type or type flag %s\n", __func__, com_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are hit the end of the stream
|
// We are hit the end of the stream
|
||||||
Sys_Error("%s: Expecting fieldtype info\n", __FUNCTION__); // Was Con_Printf here
|
Sys_Error("%s: Expecting fieldtype info\n", __func__); // Was Con_Printf here
|
||||||
return FALSE;
|
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"))
|
if (Q_stricmp(com_token, "DEFINE_DELTA_POST"))
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting DEFINE_*, got %s\n", __FUNCTION__, com_token);
|
Sys_Error("%s: Expecting DEFINE_*, got %s\n", __func__, com_token);
|
||||||
}
|
}
|
||||||
readpost = 1;
|
readpost = 1;
|
||||||
}
|
}
|
||||||
@ -1175,13 +1175,13 @@ qboolean DELTA_ParseField(int count, delta_definition_t *pdefinition, delta_link
|
|||||||
*pstream = COM_Parse(*pstream);
|
*pstream = COM_Parse(*pstream);
|
||||||
if (Q_stricmp(com_token, "("))
|
if (Q_stricmp(com_token, "("))
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting (, got %s\n", __FUNCTION__, com_token);
|
Sys_Error("%s: Expecting (, got %s\n", __func__, com_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
*pstream = COM_Parse(*pstream);
|
*pstream = COM_Parse(*pstream);
|
||||||
if (com_token[0] == 0)
|
if (com_token[0] == 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting fieldname\n", __FUNCTION__);
|
Sys_Error("%s: Expecting fieldname\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strncpy(pField->delta->fieldName, com_token, 31);
|
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);
|
*pstream = COM_Parse(*pstream);
|
||||||
if (Q_stricmp(com_token, ")"))
|
if (Q_stricmp(com_token, ")"))
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting ), got %s\n", __FUNCTION__, com_token); // Was Con_Printf here
|
Sys_Error("%s: Expecting ), got %s\n", __func__, com_token); // Was Con_Printf here
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1309,7 +1309,7 @@ void DELTA_SkipDescription(char **pstream)
|
|||||||
*pstream = COM_Parse(*pstream);
|
*pstream = COM_Parse(*pstream);
|
||||||
if (com_token[0] == 0)
|
if (com_token[0] == 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Error during description skip", __FUNCTION__);
|
Sys_Error("%s: Error during description skip", __func__);
|
||||||
}
|
}
|
||||||
} while (Q_stricmp(com_token, "}"));
|
} while (Q_stricmp(com_token, "}"));
|
||||||
}
|
}
|
||||||
@ -1363,13 +1363,13 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
|||||||
|
|
||||||
if (!ppdesc)
|
if (!ppdesc)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called with no delta_description_t\n", __FUNCTION__);
|
Sys_Error("%s: called with no delta_description_t\n", __func__);
|
||||||
}
|
}
|
||||||
*ppdesc = 0;
|
*ppdesc = 0;
|
||||||
|
|
||||||
if (!pstream)
|
if (!pstream)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called with no data stream\n", __FUNCTION__);
|
Sys_Error("%s: called with no data stream\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
@ -1389,14 +1389,14 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
|||||||
pdefinition = DELTA_FindDefinition(com_token, &count);
|
pdefinition = DELTA_FindDefinition(com_token, &count);
|
||||||
if (!pdefinition)
|
if (!pdefinition)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Unknown data type: %s\n", __FUNCTION__, com_token);
|
Sys_Error("%s: Unknown data type: %s\n", __func__, com_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse source of conditional encoder
|
// Parse source of conditional encoder
|
||||||
pstream = COM_Parse(pstream);
|
pstream = COM_Parse(pstream);
|
||||||
if (com_token[0] == 0)
|
if (com_token[0] == 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Unknown encoder : %s\nValid values:\nnone\ngamedll funcname\nclientdll funcname\n", __FUNCTION__, com_token);
|
Sys_Error("%s: Unknown encoder : %s\nValid values:\nnone\ngamedll funcname\nclientdll funcname\n", __func__, com_token);
|
||||||
}
|
}
|
||||||
if (Q_stricmp(com_token, "none"))
|
if (Q_stricmp(com_token, "none"))
|
||||||
{
|
{
|
||||||
@ -1407,7 +1407,7 @@ qboolean DELTA_ParseDescription(char *name, delta_t **ppdesc, char *pstream)
|
|||||||
pstream = COM_Parse(pstream);
|
pstream = COM_Parse(pstream);
|
||||||
if (com_token[0] == 0)
|
if (com_token[0] == 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting encoder\n", __FUNCTION__);
|
Sys_Error("%s: Expecting encoder\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strncpy(encoder, com_token, sizeof(encoder)-1);
|
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, "{"))
|
if (Q_stricmp(com_token, "{"))
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Expecting {, got %s\n", __FUNCTION__, com_token); // Was Con_Printf here
|
Sys_Error("%s: Expecting {, got %s\n", __func__, com_token); // Was Con_Printf here
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!DELTA_ParseOneField(&pstream, &links, count, pdefinition))
|
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);
|
pbuf = (char *)COM_LoadFile(pszFile, 5, 0);
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Couldn't load file %s\n", __FUNCTION__, pszFile);
|
Sys_Error("%s: Couldn't load file %s\n", __func__, pszFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
bret = DELTA_ParseDescription(name, ppdesc, pbuf);
|
bret = DELTA_ParseDescription(name, ppdesc, pbuf);
|
||||||
|
@ -30,7 +30,7 @@ unsigned int DELTAJIT_GetFieldSize(delta_description_t* desc) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Sys_Error("%s: Unknown delta field type %d", __FUNCTION__, desc->fieldType);
|
Sys_Error("%s: Unknown delta field type %d", __func__, desc->fieldType);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,11 +56,11 @@ void DELTAJIT_CreateDescription(delta_t* delta, deltajitdata_t &jitdesc) {
|
|||||||
|
|
||||||
// sanity checks & pre-clean
|
// sanity checks & pre-clean
|
||||||
if (numMemBlocks > DELTAJIT_MAX_BLOCKS) {
|
if (numMemBlocks > DELTAJIT_MAX_BLOCKS) {
|
||||||
Sys_Error("%s: numMemBlocks > DELTAJIT_MAX_BLOCKS (%d > %d)", __FUNCTION__, numMemBlocks, DELTAJIT_MAX_BLOCKS);
|
Sys_Error("%s: numMemBlocks > DELTAJIT_MAX_BLOCKS (%d > %d)", __func__, numMemBlocks, DELTAJIT_MAX_BLOCKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delta->fieldCount > DELTAJIT_MAX_FIELDS) {
|
if (delta->fieldCount > DELTAJIT_MAX_FIELDS) {
|
||||||
Sys_Error("%s: fieldCount > DELTAJIT_MAX_FIELDS (%d > %d)", __FUNCTION__, delta->fieldCount, DELTAJIT_MAX_FIELDS);
|
Sys_Error("%s: fieldCount > DELTAJIT_MAX_FIELDS (%d > %d)", __func__, delta->fieldCount, DELTAJIT_MAX_FIELDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_memset(&jitdesc, 0, sizeof(jitdesc));
|
Q_memset(&jitdesc, 0, sizeof(jitdesc));
|
||||||
@ -684,20 +684,20 @@ CDeltaJit* DELTAJit_LookupDeltaJit(const char* callsite, delta_t *pFields) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NOINLINE int DELTAJit_Fields_Clear_Mark_Check(unsigned char *from, unsigned char *to, delta_t *pFields, void* pForceMarkMask) {
|
NOINLINE int DELTAJit_Fields_Clear_Mark_Check(unsigned char *from, unsigned char *to, delta_t *pFields, void* pForceMarkMask) {
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
CDeltaClearMarkFieldsJIT &func = *deltaJit->cleanMarkCheckFunc;
|
CDeltaClearMarkFieldsJIT &func = *deltaJit->cleanMarkCheckFunc;
|
||||||
return func(from, to, deltaJit, pForceMarkMask);
|
return func(from, to, deltaJit, pForceMarkMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
NOINLINE int DELTAJit_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
NOINLINE int DELTAJit_TestDelta(unsigned char *from, unsigned char *to, delta_t *pFields)
|
||||||
{
|
{
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
CDeltaTestDeltaJIT &func = *deltaJit->testDeltaFunc;
|
CDeltaTestDeltaJIT &func = *deltaJit->testDeltaFunc;
|
||||||
return func(from, to, deltaJit);
|
return func(from, to, deltaJit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DELTAJit_SetSendFlagBits(delta_t *pFields, int *bits, int *bytecount) {
|
void DELTAJit_SetSendFlagBits(delta_t *pFields, int *bits, int *bytecount) {
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
|
|
||||||
bits[0] = deltaJit->marked_fields_mask.u32[0];
|
bits[0] = deltaJit->marked_fields_mask.u32[0];
|
||||||
bits[1] = deltaJit->marked_fields_mask.u32[1];
|
bits[1] = deltaJit->marked_fields_mask.u32[1];
|
||||||
@ -706,29 +706,29 @@ void DELTAJit_SetSendFlagBits(delta_t *pFields, int *bits, int *bytecount) {
|
|||||||
|
|
||||||
void DELTAJit_SetFieldByIndex(struct delta_s *pFields, int fieldNumber)
|
void DELTAJit_SetFieldByIndex(struct delta_s *pFields, int fieldNumber)
|
||||||
{
|
{
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
deltaJit->marked_fields_mask.u32[fieldNumber >> 5] |= (1 << (fieldNumber & 31));
|
deltaJit->marked_fields_mask.u32[fieldNumber >> 5] |= (1 << (fieldNumber & 31));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DELTAJit_UnsetFieldByIndex(struct delta_s *pFields, int fieldNumber)
|
void DELTAJit_UnsetFieldByIndex(struct delta_s *pFields, int fieldNumber)
|
||||||
{
|
{
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
deltaJit->marked_fields_mask.u32[fieldNumber >> 5] &= ~(1 << (fieldNumber & 31));
|
deltaJit->marked_fields_mask.u32[fieldNumber >> 5] &= ~(1 << (fieldNumber & 31));
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean DELTAJit_IsFieldMarked(delta_t* pFields, int fieldNumber)
|
qboolean DELTAJit_IsFieldMarked(delta_t* pFields, int fieldNumber)
|
||||||
{
|
{
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
return deltaJit->marked_fields_mask.u32[fieldNumber >> 5] & (1 << (fieldNumber & 31));
|
return deltaJit->marked_fields_mask.u32[fieldNumber >> 5] & (1 << (fieldNumber & 31));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 DELTAJit_GetOriginalMask(delta_t* pFields) {
|
uint64 DELTAJit_GetOriginalMask(delta_t* pFields) {
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
return deltaJit->originalMarkedFieldsMask.u64;
|
return deltaJit->originalMarkedFieldsMask.u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 DELTAJit_GetMaskU64(delta_t* pFields) {
|
uint64 DELTAJit_GetMaskU64(delta_t* pFields) {
|
||||||
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__FUNCTION__, pFields);
|
CDeltaJit* deltaJit = DELTAJit_LookupDeltaJit(__func__, pFields);
|
||||||
return deltaJit->marked_fields_mask.u64;
|
return deltaJit->marked_fields_mask.u64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ char* Ed_StrPool_Alloc(const char* origStr) {
|
|||||||
unsigned int len = Q_strlen(origStr) + 1;
|
unsigned int len = Q_strlen(origStr) + 1;
|
||||||
|
|
||||||
if (len >= ARRAYSIZE(str)) {
|
if (len >= ARRAYSIZE(str)) {
|
||||||
Sys_Error("%s: Too long string allocated: %s", __FUNCTION__, origStr);
|
Sys_Error("%s: Too long string allocated: %s", __func__, origStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strcpy(str, origStr);
|
Q_strcpy(str, origStr);
|
||||||
|
@ -72,7 +72,7 @@ qboolean HPAK_GetDataPointer(char *pakname, struct resource_s *pResource, unsign
|
|||||||
{
|
{
|
||||||
pbuf = (byte *)Mem_Malloc(p->datasize);
|
pbuf = (byte *)Mem_Malloc(p->datasize);
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
Sys_Error("%s: Error allocating %i bytes for hpak!", __FUNCTION__, p->datasize);
|
Sys_Error("%s: Error allocating %i bytes for hpak!", __func__, p->datasize);
|
||||||
Q_memcpy((void *)pbuf, p->data, p->datasize);
|
Q_memcpy((void *)pbuf, p->data, p->datasize);
|
||||||
*pbuffer = pbuf;
|
*pbuffer = pbuf;
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ void HPAK_AddToQueue(char *pakname, struct resource_s *pResource, void *pData, F
|
|||||||
{
|
{
|
||||||
hash_pack_queue_t *n = (hash_pack_queue_t *)Mem_Malloc(sizeof(hash_pack_queue_t));
|
hash_pack_queue_t *n = (hash_pack_queue_t *)Mem_Malloc(sizeof(hash_pack_queue_t));
|
||||||
if (!n)
|
if (!n)
|
||||||
Sys_Error("%s: Unable to allocate %i bytes for hpak queue!", __FUNCTION__, sizeof(hash_pack_queue_t));
|
Sys_Error("%s: Unable to allocate %i bytes for hpak queue!", __func__, sizeof(hash_pack_queue_t));
|
||||||
|
|
||||||
Q_memset(n, 0, sizeof(hash_pack_queue_t));
|
Q_memset(n, 0, sizeof(hash_pack_queue_t));
|
||||||
n->pakname = Mem_Strdup(pakname);
|
n->pakname = Mem_Strdup(pakname);
|
||||||
@ -181,7 +181,7 @@ void HPAK_AddToQueue(char *pakname, struct resource_s *pResource, void *pData, F
|
|||||||
n->datasize = pResource->nDownloadSize;
|
n->datasize = pResource->nDownloadSize;
|
||||||
n->data = Mem_Malloc(pResource->nDownloadSize);
|
n->data = Mem_Malloc(pResource->nDownloadSize);
|
||||||
if (!n->data)
|
if (!n->data)
|
||||||
Sys_Error("%s: Unable to allocate %i bytes for hpak queue!", __FUNCTION__, n->datasize);
|
Sys_Error("%s: Unable to allocate %i bytes for hpak queue!", __func__, n->datasize);
|
||||||
|
|
||||||
if (pData)
|
if (pData)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ void HPAK_AddToQueue(char *pakname, struct resource_s *pResource, void *pData, F
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!fpSource)
|
if (!fpSource)
|
||||||
Sys_Error("%s: Add to Queue called without data or file pointer!", __FUNCTION__);
|
Sys_Error("%s: Add to Queue called without data or file pointer!", __func__);
|
||||||
FS_Read(n->data, n->datasize, 1, fpSource);
|
FS_Read(n->data, n->datasize, 1, fpSource);
|
||||||
n->next = gp_hpak_queue;
|
n->next = gp_hpak_queue;
|
||||||
gp_hpak_queue = n;
|
gp_hpak_queue = n;
|
||||||
@ -422,7 +422,7 @@ void HPAK_RemoveLump(char *pakname, resource_t *pResource)
|
|||||||
|
|
||||||
if (pakname == NULL || *pakname == '\0' || pResource == NULL)
|
if (pakname == NULL || *pakname == '\0' || pResource == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Invalid arguments\n", __FUNCTION__);
|
Con_Printf("%s: Invalid arguments\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HPAK_FlushHostQueue();
|
HPAK_FlushHostQueue();
|
||||||
|
@ -105,7 +105,7 @@ NOXREF void Host_EndGame(const char *message, ...)
|
|||||||
Q_vsnprintf(string, sizeof(string), message, argptr);
|
Q_vsnprintf(string, sizeof(string), message, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
Con_DPrintf("%s: %s\n", __FUNCTION__, string);
|
Con_DPrintf("%s: %s\n", __func__, string);
|
||||||
|
|
||||||
oldn = g_pcls.demonum;
|
oldn = g_pcls.demonum;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ NOXREF void Host_EndGame(const char *message, ...)
|
|||||||
|
|
||||||
if (!g_pcls.state)
|
if (!g_pcls.state)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %s\n", __FUNCTION__, string);
|
Sys_Error("%s: %s\n", __func__, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldn != -1)
|
if (oldn != -1)
|
||||||
@ -142,7 +142,7 @@ void NORETURN Host_Error(const char *error, ...)
|
|||||||
va_start(argptr, error);
|
va_start(argptr, error);
|
||||||
|
|
||||||
if (inerror)
|
if (inerror)
|
||||||
Sys_Error("%s: recursively entered", __FUNCTION__);
|
Sys_Error("%s: recursively entered", __func__);
|
||||||
|
|
||||||
inerror = TRUE;
|
inerror = TRUE;
|
||||||
SCR_EndLoadingPlaque();
|
SCR_EndLoadingPlaque();
|
||||||
@ -152,7 +152,7 @@ void NORETURN Host_Error(const char *error, ...)
|
|||||||
if (g_psv.active && developer.value != 0.0 )
|
if (g_psv.active && developer.value != 0.0 )
|
||||||
CL_WriteMessageHistory(0, 0);
|
CL_WriteMessageHistory(0, 0);
|
||||||
|
|
||||||
Con_Printf("%s: %s\n", __FUNCTION__, string);
|
Con_Printf("%s: %s\n", __func__, string);
|
||||||
if (g_psv.active)
|
if (g_psv.active)
|
||||||
Host_ShutdownServer(FALSE);
|
Host_ShutdownServer(FALSE);
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ void NORETURN Host_Error(const char *error, ...)
|
|||||||
inerror = FALSE;
|
inerror = FALSE;
|
||||||
longjmp(host_abortserver, 1);
|
longjmp(host_abortserver, 1);
|
||||||
}
|
}
|
||||||
Sys_Error("%s: %s\n", __FUNCTION__, string);
|
Sys_Error("%s: %s\n", __func__, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host_InitLocal(void)
|
void Host_InitLocal(void)
|
||||||
@ -1161,11 +1161,11 @@ int Host_Init(quakeparms_t *parms)
|
|||||||
Q_memset(&g_module, 0, sizeof(g_module));
|
Q_memset(&g_module, 0, sizeof(g_module));
|
||||||
if (g_pcls.state != ca_dedicated)
|
if (g_pcls.state != ca_dedicated)
|
||||||
{
|
{
|
||||||
//Sys_Error("%s: Only dedicated server mode is supported", __FUNCTION__);
|
//Sys_Error("%s: Only dedicated server mode is supported", __func__);
|
||||||
|
|
||||||
color24 *disk_basepal = (color24 *)COM_LoadHunkFile("gfx/palette.lmp");
|
color24 *disk_basepal = (color24 *)COM_LoadHunkFile("gfx/palette.lmp");
|
||||||
if (!disk_basepal)
|
if (!disk_basepal)
|
||||||
Sys_Error("%s: Couldn't load gfx/palette.lmp", __FUNCTION__);
|
Sys_Error("%s: Couldn't load gfx/palette.lmp", __func__);
|
||||||
|
|
||||||
host_basepal = (unsigned short *)Hunk_AllocName(sizeof(PackedColorVec) * 256, "palette.lmp");
|
host_basepal = (unsigned short *)Hunk_AllocName(sizeof(PackedColorVec) * 256, "palette.lmp");
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
|
@ -1715,7 +1715,7 @@ void EntityInit(edict_t *pEdict, int className)
|
|||||||
{
|
{
|
||||||
ENTITYINIT pEntityInit;
|
ENTITYINIT pEntityInit;
|
||||||
if (!className)
|
if (!className)
|
||||||
Sys_Error("%s: Bad class!!\n", __FUNCTION__);
|
Sys_Error("%s: Bad class!!\n", __func__);
|
||||||
|
|
||||||
ReleaseEntityDLLFields(pEdict);
|
ReleaseEntityDLLFields(pEdict);
|
||||||
InitEntityDLLFields(pEdict);
|
InitEntityDLLFields(pEdict);
|
||||||
@ -1935,7 +1935,7 @@ int LoadGamestate(char *level, int createPlayers)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(pEntInfo->flags & FENTTABLE_PLAYER))
|
if (!(pEntInfo->flags & FENTTABLE_PLAYER))
|
||||||
Sys_Error("%s: ENTITY IS NOT A PLAYER: %d\n", __FUNCTION__, i);
|
Sys_Error("%s: ENTITY IS NOT A PLAYER: %d\n", __func__, i);
|
||||||
|
|
||||||
pent = g_psvs.clients[pEntInfo->id - 1].edict;
|
pent = g_psvs.clients[pEntInfo->id - 1].edict;
|
||||||
if (createPlayers && pent)
|
if (createPlayers && pent)
|
||||||
@ -2048,7 +2048,7 @@ int CreateEntityList(SAVERESTOREDATA *pSaveData, int levelMask)
|
|||||||
if (pent && !pent->free)
|
if (pent && !pent->free)
|
||||||
{
|
{
|
||||||
if (!(pEntInfo->flags & FENTTABLE_PLAYER))
|
if (!(pEntInfo->flags & FENTTABLE_PLAYER))
|
||||||
Sys_Error("%s: ENTITY IS NOT A PLAYER: %d\n", __FUNCTION__, i);
|
Sys_Error("%s: ENTITY IS NOT A PLAYER: %d\n", __func__, i);
|
||||||
|
|
||||||
if (cl->active)
|
if (cl->active)
|
||||||
EntityInit(pent, pEntInfo->classname);
|
EntityInit(pent, pEntInfo->classname);
|
||||||
@ -2339,7 +2339,7 @@ void Host_Changelevel2_f(void)
|
|||||||
FS_LogLevelLoadStarted(level);
|
FS_LogLevelLoadStarted(level);
|
||||||
|
|
||||||
if (!SV_SpawnServer(FALSE, level, startspot))
|
if (!SV_SpawnServer(FALSE, level, startspot))
|
||||||
Sys_Error("%s: Couldn't load map %s\n", __FUNCTION__, level);
|
Sys_Error("%s: Couldn't load map %s\n", __func__, level);
|
||||||
|
|
||||||
if (pSaveData)
|
if (pSaveData)
|
||||||
SaveExit(pSaveData);
|
SaveExit(pSaveData);
|
||||||
|
@ -116,7 +116,7 @@ float anglemod(float a)
|
|||||||
|
|
||||||
void BOPS_Error(void)
|
void BOPS_Error(void)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Bad signbits", __FUNCTION__);
|
Sys_Error("%s: Bad signbits", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REHLDS_OPT_PEDANTIC
|
#ifdef REHLDS_OPT_PEDANTIC
|
||||||
|
@ -68,14 +68,14 @@ void* EXT_FUNC Mod_Extradata(model_t *mod)
|
|||||||
|
|
||||||
if (mod->type == mod_brush)
|
if (mod->type == mod_brush)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called with mod_brush!\n", __FUNCTION__);
|
Sys_Error("%s: called with mod_brush!\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
Mod_LoadModel(mod, 1, 0);
|
Mod_LoadModel(mod, 1, 0);
|
||||||
|
|
||||||
if (mod->cache.data == NULL)
|
if (mod->cache.data == NULL)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: caching failed", __FUNCTION__);
|
Sys_Error("%s: caching failed", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mod->cache.data;
|
return mod->cache.data;
|
||||||
@ -88,7 +88,7 @@ mleaf_t *Mod_PointInLeaf(vec_t *p, model_t *model)
|
|||||||
mplane_t *plane;
|
mplane_t *plane;
|
||||||
|
|
||||||
if (!model || !model->nodes)
|
if (!model || !model->nodes)
|
||||||
Sys_Error("%s: bad model", __FUNCTION__);
|
Sys_Error("%s: bad model", __func__);
|
||||||
|
|
||||||
node = model->nodes;
|
node = model->nodes;
|
||||||
while (node->contents >= 0)
|
while (node->contents >= 0)
|
||||||
@ -140,7 +140,7 @@ model_t *Mod_FindName(qboolean trackCRC, const char *name)
|
|||||||
|
|
||||||
avail = NULL;
|
avail = NULL;
|
||||||
if (!name[0])
|
if (!name[0])
|
||||||
Sys_Error("%s: NULL name", __FUNCTION__);
|
Sys_Error("%s: NULL name", __func__);
|
||||||
|
|
||||||
for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++)
|
for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++)
|
||||||
{
|
{
|
||||||
@ -164,7 +164,7 @@ model_t *Mod_FindName(qboolean trackCRC, const char *name)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!avail)
|
if (!avail)
|
||||||
Sys_Error("%s: mod_numknown >= MAX_KNOWN_MODELS", __FUNCTION__);
|
Sys_Error("%s: mod_numknown >= MAX_KNOWN_MODELS", __func__);
|
||||||
mod = avail;
|
mod = avail;
|
||||||
Mod_FillInCRCInfo(trackCRC, avail - mod_known);
|
Mod_FillInCRCInfo(trackCRC, avail - mod_known);
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean trackCRC)
|
|||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
if (crash)
|
if (crash)
|
||||||
Sys_Error("%s: %s not found", __FUNCTION__, mod->name);
|
Sys_Error("%s: %s not found", __func__, mod->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean trackCRC)
|
|||||||
{
|
{
|
||||||
if (currentCRC != p->initialCRC)
|
if (currentCRC != p->initialCRC)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %s has been modified since starting the engine. Consider running system diagnostics to check for faulty hardware.\n", __FUNCTION__, mod->name);
|
Sys_Error("%s: %s has been modified since starting the engine. Consider running system diagnostics to check for faulty hardware.\n", __func__, mod->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -495,7 +495,7 @@ void Mod_LoadTextures(lump_t *l)
|
|||||||
mt->width = LittleLong(mt->width);
|
mt->width = LittleLong(mt->width);
|
||||||
mt->height = LittleLong(mt->height);
|
mt->height = LittleLong(mt->height);
|
||||||
if (mt->width & 0xF || mt->height & 0xF)
|
if (mt->width & 0xF || mt->height & 0xF)
|
||||||
Sys_Error("%s: Texture %s is not 16 aligned", __FUNCTION__, mt);
|
Sys_Error("%s: Texture %s is not 16 aligned", __func__, mt);
|
||||||
|
|
||||||
pixels = 85 * mt->height * mt->width / 64;
|
pixels = 85 * mt->height * mt->width / 64;
|
||||||
palette = *(uint16*)((char*)mt + sizeof(miptex_t) + pixels);
|
palette = *(uint16*)((char*)mt + sizeof(miptex_t) + pixels);
|
||||||
@ -559,7 +559,7 @@ void Mod_LoadTextures(lump_t *l)
|
|||||||
if (max < '0' || max > '9')
|
if (max < '0' || max > '9')
|
||||||
{
|
{
|
||||||
if (max < 'A' || max > 'J')
|
if (max < 'A' || max > 'J')
|
||||||
Sys_Error("%s: Bad animating texture %s", __FUNCTION__, tx);
|
Sys_Error("%s: Bad animating texture %s", __func__, tx);
|
||||||
altmax = max - 'A';
|
altmax = max - 'A';
|
||||||
max = 0;
|
max = 0;
|
||||||
altanims[altmax] = tx;
|
altanims[altmax] = tx;
|
||||||
@ -592,7 +592,7 @@ void Mod_LoadTextures(lump_t *l)
|
|||||||
if (num < '0' || num > '9')
|
if (num < '0' || num > '9')
|
||||||
{
|
{
|
||||||
if (num < 'A' || num > 'J')
|
if (num < 'A' || num > 'J')
|
||||||
Sys_Error("%s: Bad animating texture %s", __FUNCTION__, tx);
|
Sys_Error("%s: Bad animating texture %s", __func__, tx);
|
||||||
|
|
||||||
num -= 'A';
|
num -= 'A';
|
||||||
altanims[num] = tx2;
|
altanims[num] = tx2;
|
||||||
@ -613,7 +613,7 @@ void Mod_LoadTextures(lump_t *l)
|
|||||||
{
|
{
|
||||||
tx2 = anims[j];
|
tx2 = anims[j];
|
||||||
if (!tx2)
|
if (!tx2)
|
||||||
Sys_Error("%s: Missing frame %i of %s", __FUNCTION__, j, tx);
|
Sys_Error("%s: Missing frame %i of %s", __func__, j, tx);
|
||||||
tx2->anim_min = j;
|
tx2->anim_min = j;
|
||||||
tx2->anim_total = max;
|
tx2->anim_total = max;
|
||||||
tx2->anim_max = j + 1;
|
tx2->anim_max = j + 1;
|
||||||
@ -626,7 +626,7 @@ void Mod_LoadTextures(lump_t *l)
|
|||||||
{
|
{
|
||||||
tx2 = altanims[j];
|
tx2 = altanims[j];
|
||||||
if (!tx2)
|
if (!tx2)
|
||||||
Sys_Error("%s: Missing frame %i of %s", __FUNCTION__, j, tx);
|
Sys_Error("%s: Missing frame %i of %s", __func__, j, tx);
|
||||||
|
|
||||||
tx2->anim_min = j;
|
tx2->anim_min = j;
|
||||||
tx2->anim_total = altmax;
|
tx2->anim_total = altmax;
|
||||||
@ -706,7 +706,7 @@ void Mod_LoadVertexes(lump_t *l)
|
|||||||
|
|
||||||
in = (dvertex_t *)(mod_base + l->fileofs);
|
in = (dvertex_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (mvertex_t*) Hunk_AllocName(count * sizeof(*out), loadname);
|
out = (mvertex_t*) Hunk_AllocName(count * sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ void Mod_LoadSubmodels(lump_t *l)
|
|||||||
|
|
||||||
in = (dmodel_t *)(mod_base + l->fileofs);
|
in = (dmodel_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (dmodel_t *)Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (dmodel_t *)Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -760,7 +760,7 @@ void Mod_LoadEdges(lump_t *l)
|
|||||||
|
|
||||||
in = (dedge_t *)(mod_base + l->fileofs);
|
in = (dedge_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (medge_t*) Hunk_AllocName((count + 1) * sizeof(*out), loadname);
|
out = (medge_t*) Hunk_AllocName((count + 1) * sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -784,7 +784,7 @@ void Mod_LoadTexinfo(lump_t *l)
|
|||||||
|
|
||||||
in = (texinfo_t *)(mod_base + l->fileofs);
|
in = (texinfo_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (mtexinfo_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (mtexinfo_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -829,7 +829,7 @@ void Mod_LoadTexinfo(lump_t *l)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_miptex >= loadmodel->numtextures)
|
if (_miptex >= loadmodel->numtextures)
|
||||||
Sys_Error("%s: miptex >= loadmodel->numtextures", __FUNCTION__);
|
Sys_Error("%s: miptex >= loadmodel->numtextures", __func__);
|
||||||
out->texture = loadmodel->textures[_miptex];
|
out->texture = loadmodel->textures[_miptex];
|
||||||
if (!out->texture)
|
if (!out->texture)
|
||||||
{
|
{
|
||||||
@ -882,7 +882,7 @@ void CalcSurfaceExtents(msurface_t *s)
|
|||||||
s->texturemins[i] = bmins[i] * 16;
|
s->texturemins[i] = bmins[i] * 16;
|
||||||
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
|
s->extents[i] = (bmaxs[i] - bmins[i]) * 16;
|
||||||
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 256)
|
if (!(tex->flags & TEX_SPECIAL) && s->extents[i] > 256)
|
||||||
Sys_Error("%s: Bad surface extents", __FUNCTION__);
|
Sys_Error("%s: Bad surface extents", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -895,7 +895,7 @@ void Mod_LoadFaces(lump_t *l)
|
|||||||
|
|
||||||
in = (dface_t *)(mod_base + l->fileofs);
|
in = (dface_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (msurface_t *) Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (msurface_t *) Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -985,7 +985,7 @@ void Mod_LoadNodes(lump_t *l)
|
|||||||
|
|
||||||
in = (dnode_t *)(mod_base + l->fileofs);
|
in = (dnode_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (mnode_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (mnode_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1027,7 +1027,7 @@ void Mod_LoadLeafs(lump_t *l)
|
|||||||
|
|
||||||
in = (dleaf_t *)(mod_base + l->fileofs);
|
in = (dleaf_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (mleaf_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (mleaf_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1039,7 +1039,7 @@ void Mod_LoadLeafs(lump_t *l)
|
|||||||
|
|
||||||
if (row < 0 || row > MODEL_MAX_PVS)
|
if (row < 0 || row > MODEL_MAX_PVS)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: oversized loadmodel->numleafs: %i", __FUNCTION__, loadmodel->numleafs);
|
Sys_Error("%s: oversized loadmodel->numleafs: %i", __func__, loadmodel->numleafs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1078,7 +1078,7 @@ void Mod_LoadClipnodes(lump_t *l)
|
|||||||
|
|
||||||
in = (dclipnode_t *)(mod_base + l->fileofs);
|
in = (dclipnode_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (dclipnode_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
out = (dclipnode_t*) Hunk_AllocName(count*sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1169,7 +1169,7 @@ void Mod_LoadMarksurfaces(lump_t *l)
|
|||||||
|
|
||||||
in = (short *)(mod_base + l->fileofs);
|
in = (short *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (msurface_t **) Hunk_AllocName(count * sizeof(*out), loadname);
|
out = (msurface_t **) Hunk_AllocName(count * sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1180,7 +1180,7 @@ void Mod_LoadMarksurfaces(lump_t *l)
|
|||||||
{
|
{
|
||||||
j = LittleShort(in[i]);
|
j = LittleShort(in[i]);
|
||||||
if (j >= loadmodel->numsurfaces)
|
if (j >= loadmodel->numsurfaces)
|
||||||
Sys_Error("%s: bad surface number", __FUNCTION__);
|
Sys_Error("%s: bad surface number", __func__);
|
||||||
out[i] = loadmodel->surfaces + j;
|
out[i] = loadmodel->surfaces + j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1192,7 +1192,7 @@ void Mod_LoadSurfedges(lump_t *l)
|
|||||||
|
|
||||||
in = (int *)(mod_base + l->fileofs);
|
in = (int *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (int*) Hunk_AllocName(count * sizeof(*out), loadname);
|
out = (int*) Hunk_AllocName(count * sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1213,7 +1213,7 @@ void Mod_LoadPlanes(lump_t *l)
|
|||||||
|
|
||||||
in = (dplane_t *)(mod_base + l->fileofs);
|
in = (dplane_t *)(mod_base + l->fileofs);
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
Sys_Error("%s: funny lump size in %s", __FUNCTION__, loadmodel->name);
|
Sys_Error("%s: funny lump size in %s", __func__, loadmodel->name);
|
||||||
count = l->filelen / sizeof(*in);
|
count = l->filelen / sizeof(*in);
|
||||||
out = (mplane_t*) Hunk_AllocName(count * 2 * sizeof(*out), loadname);
|
out = (mplane_t*) Hunk_AllocName(count * 2 * sizeof(*out), loadname);
|
||||||
|
|
||||||
@ -1265,7 +1265,7 @@ void EXT_FUNC Mod_LoadBrushModel_internal(model_t *mod, void *buffer)
|
|||||||
|
|
||||||
i = LittleLong(header->version);
|
i = LittleLong(header->version);
|
||||||
if (i != Q1BSP_VERSION && i != HLBSP_VERSION)
|
if (i != Q1BSP_VERSION && i != HLBSP_VERSION)
|
||||||
Sys_Error("%s: %s has wrong version number (%i should be %i)", __FUNCTION__, mod, i, HLBSP_VERSION);
|
Sys_Error("%s: %s has wrong version number (%i should be %i)", __func__, mod, i, HLBSP_VERSION);
|
||||||
|
|
||||||
// swap all the lumps
|
// swap all the lumps
|
||||||
mod_base = (byte *)header;
|
mod_base = (byte *)header;
|
||||||
@ -1415,7 +1415,7 @@ void *Mod_LoadAliasGroup(void *pin, int *pframeindex, int numv, trivertx_t *pbbo
|
|||||||
*poutintervals = LittleFloat(pin_intervals->interval);
|
*poutintervals = LittleFloat(pin_intervals->interval);
|
||||||
|
|
||||||
if (*poutintervals <= 0.0f)
|
if (*poutintervals <= 0.0f)
|
||||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
Sys_Error("%s: interval<=0", __func__);
|
||||||
|
|
||||||
poutintervals++;
|
poutintervals++;
|
||||||
pin_intervals++;
|
pin_intervals++;
|
||||||
@ -1441,7 +1441,7 @@ void *Mod_LoadAliasSkin(void *pin, int *pskinindex, int skinsize, aliashdr_t *ph
|
|||||||
if (r_pixbytes == 1)
|
if (r_pixbytes == 1)
|
||||||
Q_memcpy(pskin, pinskin, skinsize);
|
Q_memcpy(pskin, pinskin, skinsize);
|
||||||
else if (r_pixbytes != 2)
|
else if (r_pixbytes != 2)
|
||||||
Sys_Error("%s: driver set invalid r_pixbytes: %d\n", __FUNCTION__, r_pixbytes);
|
Sys_Error("%s: driver set invalid r_pixbytes: %d\n", __func__, r_pixbytes);
|
||||||
|
|
||||||
return (void *)&pinskin[skinsize];
|
return (void *)&pinskin[skinsize];
|
||||||
}
|
}
|
||||||
@ -1471,7 +1471,7 @@ void *Mod_LoadAliasSkinGroup(void *pin, int *pskinindex, int skinsize, aliashdr_
|
|||||||
*poutskinintervals = LittleFloat(pinskinintervals->interval);
|
*poutskinintervals = LittleFloat(pinskinintervals->interval);
|
||||||
|
|
||||||
if (*poutskinintervals <= 0.0f)
|
if (*poutskinintervals <= 0.0f)
|
||||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
Sys_Error("%s: interval<=0", __func__);
|
||||||
|
|
||||||
poutskinintervals++;
|
poutskinintervals++;
|
||||||
pinskinintervals++;
|
pinskinintervals++;
|
||||||
@ -1512,7 +1512,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
|||||||
version = LittleLong(pinmodel->version);
|
version = LittleLong(pinmodel->version);
|
||||||
|
|
||||||
if (version != ALIAS_MODEL_VERSION)
|
if (version != ALIAS_MODEL_VERSION)
|
||||||
Sys_Error("%s: %s has wrong version number (%i should be %i)", __FUNCTION__, mod->name, version, ALIAS_MODEL_VERSION);
|
Sys_Error("%s: %s has wrong version number (%i should be %i)", __func__, mod->name, version, ALIAS_MODEL_VERSION);
|
||||||
|
|
||||||
// allocate space for a working header, plus all the data except the frames,
|
// allocate space for a working header, plus all the data except the frames,
|
||||||
// skin and group info
|
// skin and group info
|
||||||
@ -1532,20 +1532,20 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
|||||||
pmodel->skinheight = LittleLong(pinmodel->skinheight);
|
pmodel->skinheight = LittleLong(pinmodel->skinheight);
|
||||||
|
|
||||||
if (pmodel->skinheight > MAX_LBM_HEIGHT)
|
if (pmodel->skinheight > MAX_LBM_HEIGHT)
|
||||||
Sys_Error("%s: model %s has a skin taller than %d", __FUNCTION__, mod->name, MAX_LBM_HEIGHT);
|
Sys_Error("%s: model %s has a skin taller than %d", __func__, mod->name, MAX_LBM_HEIGHT);
|
||||||
|
|
||||||
pmodel->numverts = LittleLong(pinmodel->numverts);
|
pmodel->numverts = LittleLong(pinmodel->numverts);
|
||||||
|
|
||||||
if (pmodel->numverts <= 0)
|
if (pmodel->numverts <= 0)
|
||||||
Sys_Error("%s: model %s has no vertices", __FUNCTION__, mod->name);
|
Sys_Error("%s: model %s has no vertices", __func__, mod->name);
|
||||||
|
|
||||||
if (pmodel->numverts > MAX_ALIAS_MODEL_VERTS)
|
if (pmodel->numverts > MAX_ALIAS_MODEL_VERTS)
|
||||||
Sys_Error("%s: model %s has too many vertices", __FUNCTION__, mod->name);
|
Sys_Error("%s: model %s has too many vertices", __func__, mod->name);
|
||||||
|
|
||||||
pmodel->numtris = LittleLong(pinmodel->numtris);
|
pmodel->numtris = LittleLong(pinmodel->numtris);
|
||||||
|
|
||||||
if (pmodel->numtris <= 0)
|
if (pmodel->numtris <= 0)
|
||||||
Sys_Error("%s: model %s has no triangles", __FUNCTION__, mod->name);
|
Sys_Error("%s: model %s has no triangles", __func__, mod->name);
|
||||||
|
|
||||||
pmodel->numframes = LittleLong(pinmodel->numframes);
|
pmodel->numframes = LittleLong(pinmodel->numframes);
|
||||||
pmodel->size = LittleFloat(pinmodel->size) * 0.09090909090909091;
|
pmodel->size = LittleFloat(pinmodel->size) * 0.09090909090909091;
|
||||||
@ -1564,7 +1564,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
|||||||
numframes = pmodel->numframes;
|
numframes = pmodel->numframes;
|
||||||
|
|
||||||
if ((pmodel->skinwidth % 4) != 0)
|
if ((pmodel->skinwidth % 4) != 0)
|
||||||
Sys_Error("%s: skinwidth not multiple of 4", __FUNCTION__);
|
Sys_Error("%s: skinwidth not multiple of 4", __func__);
|
||||||
|
|
||||||
pheader->model = (byte *)pmodel - (byte *)pheader;
|
pheader->model = (byte *)pmodel - (byte *)pheader;
|
||||||
|
|
||||||
@ -1572,7 +1572,7 @@ void Mod_LoadAliasModel(model_t *mod, void *buffer)
|
|||||||
skinsize = pmodel->skinwidth * pmodel->skinheight;
|
skinsize = pmodel->skinwidth * pmodel->skinheight;
|
||||||
|
|
||||||
if (numskins < 1)
|
if (numskins < 1)
|
||||||
Sys_Error("%s: Invalid # of skins: %d\n", __FUNCTION__, numskins);
|
Sys_Error("%s: Invalid # of skins: %d\n", __func__, numskins);
|
||||||
|
|
||||||
pskintype = (daliasskintype_t *)(pinmodel + 1);
|
pskintype = (daliasskintype_t *)(pinmodel + 1);
|
||||||
pskindesc = (maliasskindesc_t *)Hunk_AllocName(sizeof(maliasskindesc_t) * numskins, loadname);
|
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
|
// load the frames
|
||||||
if (numframes < 1)
|
if (numframes < 1)
|
||||||
Sys_Error("%s: Invalid # of frames: %d\n", __FUNCTION__, numframes);
|
Sys_Error("%s: Invalid # of frames: %d\n", __func__, numframes);
|
||||||
|
|
||||||
pframetype = (daliasframetype_t *)(pintriangles + pmodel->numtris);
|
pframetype = (daliasframetype_t *)(pintriangles + pmodel->numtris);
|
||||||
for (i = 0; i < numframes; i++)
|
for (i = 0; i < numframes; i++)
|
||||||
@ -1713,7 +1713,7 @@ void *Mod_LoadSpriteFrame(void *pin, mspriteframe_t **ppframe)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: driver set invalid r_pixbytes: %d\n", __FUNCTION__, r_pixbytes);
|
Sys_Error("%s: driver set invalid r_pixbytes: %d\n", __func__, r_pixbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (void *)((byte *)pinframe + sizeof(dspriteframe_t) + size);
|
return (void *)((byte *)pinframe + sizeof(dspriteframe_t) + size);
|
||||||
@ -1747,7 +1747,7 @@ void *Mod_LoadSpriteGroup(void *pin, mspriteframe_t **ppframe)
|
|||||||
{
|
{
|
||||||
*poutintervals = LittleFloat(pin_intervals->interval);
|
*poutintervals = LittleFloat(pin_intervals->interval);
|
||||||
if (*poutintervals <= 0.0f)
|
if (*poutintervals <= 0.0f)
|
||||||
Sys_Error("%s: interval<=0", __FUNCTION__);
|
Sys_Error("%s: interval<=0", __func__);
|
||||||
|
|
||||||
poutintervals++;
|
poutintervals++;
|
||||||
pin_intervals++;
|
pin_intervals++;
|
||||||
@ -1777,7 +1777,7 @@ void Mod_LoadSpriteModel(model_t *mod, void *buffer)
|
|||||||
|
|
||||||
version = LittleLong(pin->version);
|
version = LittleLong(pin->version);
|
||||||
if (version != SPRITE_VERSION)
|
if (version != SPRITE_VERSION)
|
||||||
Sys_Error("%s: %s has wrong version number (%i should be %i)", __FUNCTION__, mod->name, version, SPRITE_VERSION);
|
Sys_Error("%s: %s has wrong version number (%i should be %i)", __func__, mod->name, version, SPRITE_VERSION);
|
||||||
|
|
||||||
numframes = LittleLong(pin->numframes);
|
numframes = LittleLong(pin->numframes);
|
||||||
int palsize = *(uint16*)&pin[1];
|
int palsize = *(uint16*)&pin[1];
|
||||||
@ -1814,7 +1814,7 @@ void Mod_LoadSpriteModel(model_t *mod, void *buffer)
|
|||||||
// load the frames
|
// load the frames
|
||||||
//
|
//
|
||||||
if (numframes < 1)
|
if (numframes < 1)
|
||||||
Sys_Error("%s: Invalid # of frames: %d\n", __FUNCTION__, numframes);
|
Sys_Error("%s: Invalid # of frames: %d\n", __func__, numframes);
|
||||||
|
|
||||||
mod->numframes = numframes;
|
mod->numframes = numframes;
|
||||||
mod->flags = 0;
|
mod->flags = 0;
|
||||||
@ -1913,7 +1913,7 @@ model_t *Mod_Handle(int modelindex)
|
|||||||
{
|
{
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
if (modelindex < 0 || modelindex > MAX_MODELS - 1) {
|
if (modelindex < 0 || modelindex > MAX_MODELS - 1) {
|
||||||
Sys_Error("%s: bad modelindex #%i\n", __FUNCTION__, modelindex);
|
Sys_Error("%s: bad modelindex #%i\n", __func__, modelindex);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list)
|
|||||||
|
|
||||||
if (list == nullptr)
|
if (list == nullptr)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Asked to unlink fragment from empty list, ignored\n", __FUNCTION__);
|
Con_Printf("%s: Asked to unlink fragment from empty list, ignored\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list)
|
|||||||
search = search->next;
|
search = search->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_Printf("%s: Couldn't find fragment\n", __FUNCTION__);
|
Con_Printf("%s: Couldn't find fragment\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Netchan_OutOfBand(netsrc_t sock, netadr_t adr, int length, byte *data)
|
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)
|
if (chan->reliable_length)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: reliable length not 0, reliable_sequence: %d, incoming_reliable_acknowledged: %d\n", __FUNCTION__, chan->reliable_length, chan->incoming_reliable_acknowledged);
|
Con_DPrintf("%s: reliable length not 0, reliable_sequence: %d, incoming_reliable_acknowledged: %d\n", __func__, chan->reliable_length, chan->incoming_reliable_acknowledged);
|
||||||
chan->reliable_sequence ^= 1;
|
chan->reliable_sequence ^= 1;
|
||||||
chan->reliable_length = 0;
|
chan->reliable_length = 0;
|
||||||
}
|
}
|
||||||
@ -1158,7 +1158,7 @@ void Netchan_CreateFileFragmentsFromBuffer(qboolean server, netchan_t *chan, con
|
|||||||
if (server)
|
if (server)
|
||||||
SV_DropClient(host_client, 0, "Malloc problem");
|
SV_DropClient(host_client, 0, "Malloc problem");
|
||||||
else
|
else
|
||||||
rehlds_syserror("%s:Reverse me: client-side code", __FUNCTION__);
|
rehlds_syserror("%s:Reverse me: client-side code", __func__);
|
||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
if (bCompressed) {
|
if (bCompressed) {
|
||||||
@ -1358,7 +1358,7 @@ int Netchan_CreateFileFragments_(qboolean server, netchan_t *chan, const char *f
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: Reverse clientside code", __FUNCTION__);
|
rehlds_syserror("%s: Reverse clientside code", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -589,7 +589,7 @@ void NET_TransferRawData(sizebuf_t *msg, unsigned char *pStart, int nSize)
|
|||||||
#ifdef REHLDS_CHECKS
|
#ifdef REHLDS_CHECKS
|
||||||
if (msg->maxsize < nSize)
|
if (msg->maxsize < nSize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: data size is bigger than sizebuf maxsize", __FUNCTION__);
|
Sys_Error("%s: data size is bigger than sizebuf maxsize", __func__);
|
||||||
}
|
}
|
||||||
#endif // REHLDS_CHECKS
|
#endif // REHLDS_CHECKS
|
||||||
Q_memcpy(msg->data, pStart, nSize);
|
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
|
#ifdef REHLDS_CHECKS
|
||||||
if (sizeof(loop->msgs[i].data) < length)
|
if (sizeof(loop->msgs[i].data) < length)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: data size is bigger than message storage size", __FUNCTION__);
|
Sys_Error("%s: data size is bigger than message storage size", __func__);
|
||||||
}
|
}
|
||||||
#endif // REHLDS_CHECKS
|
#endif // REHLDS_CHECKS
|
||||||
|
|
||||||
@ -1004,15 +1004,15 @@ qboolean NET_QueuePacket(netsrc_t sock)
|
|||||||
{
|
{
|
||||||
if (err == WSAEMSGSIZE)
|
if (err == WSAEMSGSIZE)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: Ignoring oversized network message\n", __FUNCTION__);
|
Con_DPrintf("%s: Ignoring oversized network message\n", __func__);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_pcls.state != ca_dedicated)
|
if (g_pcls.state != ca_dedicated)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %s", __FUNCTION__, NET_ErrorString(err));
|
Sys_Error("%s: %s", __func__, NET_ErrorString(err));
|
||||||
}
|
}
|
||||||
Con_Printf("%s: %s\n", __FUNCTION__, NET_ErrorString(err));
|
Con_Printf("%s: %s\n", __func__, NET_ErrorString(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -1022,7 +1022,7 @@ qboolean NET_QueuePacket(netsrc_t sock)
|
|||||||
if (ret != MAX_UDP_PACKET)
|
if (ret != MAX_UDP_PACKET)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Con_NetPrintf("%s: Oversize packet from %s\n", __FUNCTION__, NET_AdrToString(in_from));
|
Con_NetPrintf("%s: Oversize packet from %s\n", __func__, NET_AdrToString(in_from));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == -1 || ret == MAX_UDP_PACKET) {
|
if (ret == -1 || ret == MAX_UDP_PACKET) {
|
||||||
@ -1169,7 +1169,7 @@ void NET_StartThread(void)
|
|||||||
if (!net_thread_initialized)
|
if (!net_thread_initialized)
|
||||||
{
|
{
|
||||||
net_thread_initialized = TRUE;
|
net_thread_initialized = TRUE;
|
||||||
Sys_Error("%s: -net_thread is not reversed yet", __FUNCTION__);
|
Sys_Error("%s: -net_thread is not reversed yet", __func__);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/*
|
/*
|
||||||
InitializeCriticalSection(&net_cs);
|
InitializeCriticalSection(&net_cs);
|
||||||
@ -1179,7 +1179,7 @@ void NET_StartThread(void)
|
|||||||
DeleteCriticalSection(&net_cs);
|
DeleteCriticalSection(&net_cs);
|
||||||
net_thread_initialized = 0;
|
net_thread_initialized = 0;
|
||||||
use_thread = 0;
|
use_thread = 0;
|
||||||
Sys_Error("%s: Couldn't initialize network thread, run without -net_thread\n", __FUNCTION__);
|
Sys_Error("%s: Couldn't initialize network thread, run without -net_thread\n", __func__);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
@ -1200,7 +1200,7 @@ void NET_StopThread(void)
|
|||||||
*/
|
*/
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
net_thread_initialized = FALSE;
|
net_thread_initialized = FALSE;
|
||||||
Sys_Error("%s: -net_thread is not reversed yet", __FUNCTION__);
|
Sys_Error("%s: -net_thread is not reversed yet", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1467,7 +1467,7 @@ void NET_SendPacket(netsrc_t sock, int length, void *data, const netadr_t& to)
|
|||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad address type", __FUNCTION__);
|
Sys_Error("%s: bad address type", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
NetadrToSockadr(&to, &addr);
|
NetadrToSockadr(&to, &addr);
|
||||||
@ -1495,17 +1495,17 @@ void NET_SendPacket(netsrc_t sock, int length, void *data, const netadr_t& to)
|
|||||||
// let dedicated servers continue after errors
|
// let dedicated servers continue after errors
|
||||||
if (g_pcls.state == ca_dedicated)
|
if (g_pcls.state == ca_dedicated)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: ERROR: %s\n", __FUNCTION__, NET_ErrorString(err));
|
Con_Printf("%s: ERROR: %s\n", __func__, NET_ErrorString(err));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (err == WSAEADDRNOTAVAIL || err == WSAENOBUFS)
|
if (err == WSAEADDRNOTAVAIL || err == WSAENOBUFS)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: Warning: %s : %s\n", __FUNCTION__, NET_ErrorString(err), NET_AdrToString(to));
|
Con_DPrintf("%s: Warning: %s : %s\n", __func__, NET_ErrorString(err), NET_AdrToString(to));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: ERROR: %s\n", __FUNCTION__, NET_ErrorString(err));
|
Sys_Error("%s: ERROR: %s\n", __func__, NET_ErrorString(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1668,7 +1668,7 @@ void NET_OpenIP(void)
|
|||||||
if (!ip_sockets[NS_SERVER] && dedicated)
|
if (!ip_sockets[NS_SERVER] && dedicated)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Couldn't allocate dedicated server IP port %d.", __FUNCTION__, port);
|
Sys_Error("%s: Couldn't allocate dedicated server IP port %d.", __func__, port);
|
||||||
}
|
}
|
||||||
sv_port = port;
|
sv_port = port;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ int EXT_FUNC PM_HullPointContents(hull_t *hull, int num, vec_t *p)
|
|||||||
while (num >= 0)
|
while (num >= 0)
|
||||||
{
|
{
|
||||||
if (num < hull->firstclipnode || num > hull->lastclipnode)
|
if (num < hull->firstclipnode || num > hull->lastclipnode)
|
||||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
Sys_Error("%s: bad node number", __func__);
|
||||||
node = &hull->clipnodes[num];
|
node = &hull->clipnodes[num];
|
||||||
plane = &hull->planes[node->planenum];
|
plane = &hull->planes[node->planenum];
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ void EXT_FUNC SetMinMaxSize(edict_t *e, const float *min, const float *max, qboo
|
|||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (min[i] > max[i])
|
if (min[i] > max[i])
|
||||||
Host_Error("%s: backwards mins/maxs", __FUNCTION__);
|
Host_Error("%s: backwards mins/maxs", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
e->v.mins[0] = min[0];
|
e->v.mins[0] = min[0];
|
||||||
@ -161,7 +161,7 @@ void EXT_FUNC PF_setmodel_I(edict_t *e, const char *m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Host_Error("%s: no precache: %s\n", __FUNCTION__, m);
|
Host_Error("%s: no precache: %s\n", __func__, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
int EXT_FUNC PF_modelindex(const char *pstr)
|
int EXT_FUNC PF_modelindex(const char *pstr)
|
||||||
@ -324,13 +324,13 @@ void EXT_FUNC PF_ambientsound_I(edict_t *entity, float *pos, const char *samp, f
|
|||||||
void EXT_FUNC PF_sound_I(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch)
|
void EXT_FUNC PF_sound_I(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch)
|
||||||
{
|
{
|
||||||
if (volume < 0.0 || volume > 255.0)
|
if (volume < 0.0 || volume > 255.0)
|
||||||
Sys_Error("%s: volume = %i", __FUNCTION__, volume);
|
Sys_Error("%s: volume = %i", __func__, volume);
|
||||||
if (attenuation < 0.0 || attenuation > 4.0)
|
if (attenuation < 0.0 || attenuation > 4.0)
|
||||||
Sys_Error("%s: attenuation = %f", __FUNCTION__, attenuation);
|
Sys_Error("%s: attenuation = %f", __func__, attenuation);
|
||||||
if (channel < 0 || channel > 7)
|
if (channel < 0 || channel > 7)
|
||||||
Sys_Error("%s: channel = %i", __FUNCTION__, channel);
|
Sys_Error("%s: channel = %i", __func__, channel);
|
||||||
if (pitch < 0 || pitch > 255)
|
if (pitch < 0 || pitch > 255)
|
||||||
Sys_Error("%s: pitch = %i", __FUNCTION__, pitch);
|
Sys_Error("%s: pitch = %i", __func__, pitch);
|
||||||
SV_StartSound(0, entity, channel, sample, (int)(volume * 255), attenuation, fFlags, pitch);
|
SV_StartSound(0, entity, channel, sample, (int)(volume * 255), attenuation, fFlags, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ void EXT_FUNC TraceHull(const float *v1, const float *v2, int fNoMonsters, int h
|
|||||||
|
|
||||||
void EXT_FUNC TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr)
|
void EXT_FUNC TraceSphere(const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: TraceSphere not yet implemented!\n", __FUNCTION__);
|
Sys_Error("%s: TraceSphere not yet implemented!\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr)
|
void EXT_FUNC TraceModel(const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr)
|
||||||
@ -906,7 +906,7 @@ edict_t* EXT_FUNC CreateNamedEntity(int className)
|
|||||||
ENTITYINIT pEntityInit;
|
ENTITYINIT pEntityInit;
|
||||||
|
|
||||||
if (!className)
|
if (!className)
|
||||||
Sys_Error("%s: Spawned a NULL entity!", __FUNCTION__);
|
Sys_Error("%s: Spawned a NULL entity!", __func__);
|
||||||
|
|
||||||
pedict = ED_Alloc();
|
pedict = ED_Alloc();
|
||||||
pedict->v.classname = className;
|
pedict->v.classname = className;
|
||||||
@ -1020,13 +1020,13 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(s))
|
if (PR_IsEmptyString(s))
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
Host_Error("%s: Bad string '%s'", __func__, s);
|
||||||
|
|
||||||
if (s[0] == '!')
|
if (s[0] == '!')
|
||||||
Host_Error("%s: '%s' do not precache sentence names!", __FUNCTION__, s);
|
Host_Error("%s: '%s' do not precache sentence names!", __func__, s);
|
||||||
|
|
||||||
if (g_psv.state == ss_loading)
|
if (g_psv.state == ss_loading)
|
||||||
{
|
{
|
||||||
@ -1050,7 +1050,7 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Host_Error("%s: Sound '%s' failed to precache because the item count is over the %d limit.\n"
|
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__,
|
"Reduce the number of brush models and/or regular models in the map to correct this.", __func__,
|
||||||
s, MAX_SOUNDS);
|
s, MAX_SOUNDS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1062,7 +1062,7 @@ int EXT_FUNC PF_precache_sound_I(const char *s)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// unreach
|
// 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)
|
unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
||||||
{
|
{
|
||||||
if (!psz)
|
if (!psz)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(psz))
|
if (PR_IsEmptyString(psz))
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, psz);
|
Host_Error("%s: Bad string '%s'", __func__, psz);
|
||||||
|
|
||||||
if (g_psv.state == ss_loading)
|
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 (!ev->filename)
|
||||||
{
|
{
|
||||||
if (type != 1)
|
if (type != 1)
|
||||||
Host_Error("%s: only file type 1 supported currently\n", __FUNCTION__);
|
Host_Error("%s: only file type 1 supported currently\n", __func__);
|
||||||
|
|
||||||
char szpath[MAX_PATH];
|
char szpath[MAX_PATH];
|
||||||
Q_snprintf(szpath, sizeof(szpath), "%s", psz);
|
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;
|
int scriptSize = 0;
|
||||||
char* evScript = (char*) COM_LoadFile(szpath, 5, &scriptSize);
|
char* evScript = (char*) COM_LoadFile(szpath, 5, &scriptSize);
|
||||||
if (!evScript)
|
if (!evScript)
|
||||||
Host_Error("%s: file %s missing from server\n", __FUNCTION__, psz);
|
Host_Error("%s: file %s missing from server\n", __func__, psz);
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
// Many modders don't know that the resource names passed to precache functions must be a static strings.
|
// 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.
|
// 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))
|
if (!Q_stricmp(ev->filename, psz))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
Host_Error("%s: '%s' overflow", __FUNCTION__, psz);
|
Host_Error("%s: '%s' overflow", __func__, psz);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1125,7 +1125,7 @@ unsigned short EXT_FUNC EV_Precache(int type, const char *psz)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, psz);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, 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)
|
if (eventindex < 1u || eventindex >= MAX_EVENTS)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: index out of range %i\n", __FUNCTION__, eventindex);
|
Con_DPrintf("%s: index out of range %i\n", __func__, eventindex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_psv.event_precache[eventindex].pszScript)
|
if (!g_psv.event_precache[eventindex].pszScript)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: no event for index %i\n", __FUNCTION__, eventindex);
|
Con_DPrintf("%s: no event for index %i\n", __func__, eventindex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1355,7 +1355,7 @@ void EXT_FUNC EV_SV_Playback(int flags, int clientindex, unsigned short eventind
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (clientindex < 0 || clientindex >= g_psvs.maxclients)
|
if (clientindex < 0 || clientindex >= g_psvs.maxclients)
|
||||||
Host_Error("%s: Client index %i out of range\n", __FUNCTION__, clientindex);
|
Host_Error("%s: Client index %i out of range\n", __func__, clientindex);
|
||||||
|
|
||||||
edict_t *pEdict = g_psvs.clients[clientindex].edict;
|
edict_t *pEdict = g_psvs.clients[clientindex].edict;
|
||||||
EV_Playback(flags,pEdict, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2);
|
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;
|
int iOptional = 0;
|
||||||
if (!s)
|
if (!s)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(s))
|
if (PR_IsEmptyString(s))
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
Host_Error("%s: Bad string '%s'", __func__, s);
|
||||||
|
|
||||||
if (*s == '!')
|
if (*s == '!')
|
||||||
{
|
{
|
||||||
@ -1436,7 +1436,7 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Host_Error("%s: Model '%s' failed to precache because the item count is over the %d limit.\n"
|
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__,
|
"Reduce the number of brush models and/or regular models in the map to correct this.", __func__,
|
||||||
s, MAX_MODELS);
|
s, MAX_MODELS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1452,7 +1452,7 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
|||||||
return i;
|
return i;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1460,12 +1460,12 @@ int EXT_FUNC PF_precache_model_I(const char *s)
|
|||||||
int EXT_FUNC PF_precache_generic_I(char *s)
|
int EXT_FUNC PF_precache_generic_I(char *s)
|
||||||
{
|
{
|
||||||
if (!s)
|
if (!s)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(s))
|
if (PR_IsEmptyString(s))
|
||||||
{
|
{
|
||||||
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
Host_Error("%s: Bad string '%s'", __func__, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
char resName[MAX_QPATH];
|
char resName[MAX_QPATH];
|
||||||
@ -1490,12 +1490,12 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_psv.state != ss_loading)
|
if (g_psv.state != ss_loading)
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, resName);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, resName);
|
||||||
|
|
||||||
if (resCount >= ARRAYSIZE(g_rehlds_sv.precachedGenericResourceNames))
|
if (resCount >= ARRAYSIZE(g_rehlds_sv.precachedGenericResourceNames))
|
||||||
{
|
{
|
||||||
Host_Error("%s: Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
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__,
|
"Reduce the number of brush models and/or regular models in the map to correct this.", __func__,
|
||||||
resName, ARRAYSIZE(g_rehlds_sv.precachedGenericResourceNames));
|
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)
|
int EXT_FUNC PF_precache_generic_I(char *s)
|
||||||
{
|
{
|
||||||
if (!s)
|
if (!s)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(s))
|
if (PR_IsEmptyString(s))
|
||||||
{
|
{
|
||||||
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
// TODO: Call to Con_Printf is replaced with Host_Error in 6153
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, s);
|
Host_Error("%s: Bad string '%s'", __func__, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_psv.state == ss_loading)
|
if (g_psv.state == ss_loading)
|
||||||
@ -1529,7 +1529,7 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
Host_Error("%s: Generic item '%s' failed to precache because the item count is over the %d limit.\n"
|
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__,
|
"Reduce the number of brush models and/or regular models in the map to correct this.", __func__,
|
||||||
s, MAX_GENERIC);
|
s, MAX_GENERIC);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1539,7 +1539,7 @@ int EXT_FUNC PF_precache_generic_I(char *s)
|
|||||||
if (!Q_stricmp(g_psv.generic_precache[i], s))
|
if (!Q_stricmp(g_psv.generic_precache[i], s))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, s);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // REHLDS_FIXES
|
#endif // REHLDS_FIXES
|
||||||
@ -1614,7 +1614,7 @@ void EXT_FUNC PF_SetKeyValue_I(char *infobuffer, const char *key, const char *va
|
|||||||
{
|
{
|
||||||
if (infobuffer != Info_Serverinfo())
|
if (infobuffer != Info_Serverinfo())
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Can't set client keys with SetKeyValue", __FUNCTION__);
|
Sys_Error("%s: Can't set client keys with SetKeyValue", __func__);
|
||||||
}
|
}
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
Info_SetValueForKey(infobuffer, key, value, MAX_INFO_STRING); // Use correct length
|
Info_SetValueForKey(infobuffer, key, value, MAX_INFO_STRING); // Use correct length
|
||||||
@ -1906,7 +1906,7 @@ void EXT_FUNC PF_setview_I(const edict_t *clientent, const edict_t *viewent)
|
|||||||
{
|
{
|
||||||
int clientnum = NUM_FOR_EDICT(clientent);
|
int clientnum = NUM_FOR_EDICT(clientent);
|
||||||
if (clientnum < 1 || clientnum > g_psvs.maxclients)
|
if (clientnum < 1 || clientnum > g_psvs.maxclients)
|
||||||
Host_Error("%s: not a client", __FUNCTION__);
|
Host_Error("%s: not a client", __func__);
|
||||||
|
|
||||||
client_t *client = &g_psvs.clients[clientnum - 1];
|
client_t *client = &g_psvs.clients[clientnum - 1];
|
||||||
if (!client->fakeclient)
|
if (!client->fakeclient)
|
||||||
@ -2049,7 +2049,7 @@ sizebuf_t* EXT_FUNC WriteDest_Parm(int dest)
|
|||||||
entnum = NUM_FOR_EDICT(gMsgEntity);
|
entnum = NUM_FOR_EDICT(gMsgEntity);
|
||||||
if (entnum <= 0 || entnum > g_psvs.maxclients)
|
if (entnum <= 0 || entnum > g_psvs.maxclients)
|
||||||
{
|
{
|
||||||
Host_Error("%s: not a client", __FUNCTION__);
|
Host_Error("%s: not a client", __func__);
|
||||||
}
|
}
|
||||||
if (dest == MSG_ONE)
|
if (dest == MSG_ONE)
|
||||||
{
|
{
|
||||||
@ -2069,7 +2069,7 @@ sizebuf_t* EXT_FUNC WriteDest_Parm(int dest)
|
|||||||
case MSG_SPEC:
|
case MSG_SPEC:
|
||||||
return &g_psv.spectator;
|
return &g_psv.spectator;
|
||||||
default:
|
default:
|
||||||
Host_Error("%s: bad destination = %d", __FUNCTION__, dest);
|
Host_Error("%s: bad destination = %d", __func__, dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2078,19 +2078,19 @@ void EXT_FUNC PF_MessageBegin_I(int msg_dest, int msg_type, const float *pOrigin
|
|||||||
if (msg_dest == MSG_ONE || msg_dest == MSG_ONE_UNRELIABLE)
|
if (msg_dest == MSG_ONE || msg_dest == MSG_ONE_UNRELIABLE)
|
||||||
{
|
{
|
||||||
if (!ed)
|
if (!ed)
|
||||||
Sys_Error("%s: with no target entity\n", __FUNCTION__);
|
Sys_Error("%s: with no target entity\n", __func__);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ed)
|
if (ed)
|
||||||
Sys_Error("%s: Invalid message: Cannot use broadcast message with a target entity", __FUNCTION__);
|
Sys_Error("%s: Invalid message: Cannot use broadcast message with a target entity", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gMsgStarted)
|
if (gMsgStarted)
|
||||||
Sys_Error("%s: New message started when msg '%d' has not been sent yet", __FUNCTION__, gMsgType);
|
Sys_Error("%s: New message started when msg '%d' has not been sent yet", __func__, gMsgType);
|
||||||
|
|
||||||
if (msg_type == 0)
|
if (msg_type == 0)
|
||||||
Sys_Error("%s: Tried to create a message with a bogus message type ( 0 )", __FUNCTION__);
|
Sys_Error("%s: Tried to create a message with a bogus message type ( 0 )", __func__);
|
||||||
|
|
||||||
gMsgStarted = 1;
|
gMsgStarted = 1;
|
||||||
gMsgType = msg_type;
|
gMsgType = msg_type;
|
||||||
@ -2117,14 +2117,14 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
|||||||
{
|
{
|
||||||
qboolean MsgIsVarLength = 0;
|
qboolean MsgIsVarLength = 0;
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
gMsgStarted = 0;
|
gMsgStarted = 0;
|
||||||
|
|
||||||
if (gMsgEntity && (gMsgEntity->v.flags & FL_FAKECLIENT))
|
if (gMsgEntity && (gMsgEntity->v.flags & FL_FAKECLIENT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gMsgBuffer.flags & SIZEBUF_OVERFLOWED)
|
if (gMsgBuffer.flags & SIZEBUF_OVERFLOWED)
|
||||||
Sys_Error("%s: called, but message buffer from .dll had overflowed\n", __FUNCTION__);
|
Sys_Error("%s: called, but message buffer from .dll had overflowed\n", __func__);
|
||||||
|
|
||||||
|
|
||||||
if (gMsgType > svc_startofusermessages)
|
if (gMsgType > svc_startofusermessages)
|
||||||
@ -2142,7 +2142,7 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
|||||||
|
|
||||||
if (!pUserMsg)
|
if (!pUserMsg)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: Unknown User Msg %d\n", __FUNCTION__, gMsgType);
|
Con_DPrintf("%s: Unknown User Msg %d\n", __func__, gMsgType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2152,12 +2152,12 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
|||||||
|
|
||||||
// Limit packet sizes
|
// Limit packet sizes
|
||||||
if (gMsgBuffer.cursize > MAX_USER_MSG_DATA)
|
if (gMsgBuffer.cursize > MAX_USER_MSG_DATA)
|
||||||
Host_Error("%s: Refusing to send user message %s of %i bytes to client, user message size limit is %i bytes\n", __FUNCTION__, pUserMsg->szName, gMsgBuffer.cursize, MAX_USER_MSG_DATA);
|
Host_Error("%s: Refusing to send user message %s of %i bytes to client, user message size limit is %i bytes\n", __func__, pUserMsg->szName, gMsgBuffer.cursize, MAX_USER_MSG_DATA);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pUserMsg->iSize != gMsgBuffer.cursize)
|
if (pUserMsg->iSize != gMsgBuffer.cursize)
|
||||||
Sys_Error("%s: User Msg '%s': %d bytes written, expected %d\n", __FUNCTION__, pUserMsg->szName, gMsgBuffer.cursize, pUserMsg->iSize);
|
Sys_Error("%s: User Msg '%s': %d bytes written, expected %d\n", __func__, pUserMsg->szName, gMsgBuffer.cursize, pUserMsg->iSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
@ -2172,7 +2172,7 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
|||||||
{
|
{
|
||||||
int entnum = NUM_FOR_EDICT((const edict_t *)gMsgEntity);
|
int entnum = NUM_FOR_EDICT((const edict_t *)gMsgEntity);
|
||||||
if (entnum < 1 || entnum > g_psvs.maxclients)
|
if (entnum < 1 || entnum > g_psvs.maxclients)
|
||||||
Host_Error("%s: not a client", __FUNCTION__);
|
Host_Error("%s: not a client", __func__);
|
||||||
|
|
||||||
client_t* client = &g_psvs.clients[entnum - 1];
|
client_t* client = &g_psvs.clients[entnum - 1];
|
||||||
if (client->fakeclient || !client->hasusrmsgs || (!client->active && !client->spawned))
|
if (client->fakeclient || !client->hasusrmsgs || (!client->active && !client->spawned))
|
||||||
@ -2232,56 +2232,56 @@ void EXT_FUNC PF_MessageEnd_I(void)
|
|||||||
void EXT_FUNC PF_WriteByte_I(int iValue)
|
void EXT_FUNC PF_WriteByte_I(int iValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteByte(&gMsgBuffer, iValue);
|
MSG_WriteByte(&gMsgBuffer, iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteChar_I(int iValue)
|
void EXT_FUNC PF_WriteChar_I(int iValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteChar(&gMsgBuffer, iValue);
|
MSG_WriteChar(&gMsgBuffer, iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteShort_I(int iValue)
|
void EXT_FUNC PF_WriteShort_I(int iValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteShort(&gMsgBuffer, iValue);
|
MSG_WriteShort(&gMsgBuffer, iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteLong_I(int iValue)
|
void EXT_FUNC PF_WriteLong_I(int iValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteLong(&gMsgBuffer, iValue);
|
MSG_WriteLong(&gMsgBuffer, iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteAngle_I(float flValue)
|
void EXT_FUNC PF_WriteAngle_I(float flValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteAngle(&gMsgBuffer, flValue);
|
MSG_WriteAngle(&gMsgBuffer, flValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteCoord_I(float flValue)
|
void EXT_FUNC PF_WriteCoord_I(float flValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteShort(&gMsgBuffer, (int)(flValue * 8.0));
|
MSG_WriteShort(&gMsgBuffer, (int)(flValue * 8.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteString_I(const char *sz)
|
void EXT_FUNC PF_WriteString_I(const char *sz)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteString(&gMsgBuffer, sz);
|
MSG_WriteString(&gMsgBuffer, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_WriteEntity_I(int iValue)
|
void EXT_FUNC PF_WriteEntity_I(int iValue)
|
||||||
{
|
{
|
||||||
if (!gMsgStarted)
|
if (!gMsgStarted)
|
||||||
Sys_Error("%s: called with no active message\n", __FUNCTION__);
|
Sys_Error("%s: called with no active message\n", __func__);
|
||||||
MSG_WriteShort(&gMsgBuffer, iValue);
|
MSG_WriteShort(&gMsgBuffer, iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2331,7 +2331,7 @@ void EXT_FUNC PF_setspawnparms_I(edict_t *ent)
|
|||||||
{
|
{
|
||||||
int i = NUM_FOR_EDICT(ent);
|
int i = NUM_FOR_EDICT(ent);
|
||||||
if (i < 1 || i > g_psvs.maxclients)
|
if (i < 1 || i > g_psvs.maxclients)
|
||||||
Host_Error("%s: Entity is not a client", __FUNCTION__);
|
Host_Error("%s: Entity is not a client", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC PF_changelevel_I(const char *s1, const char *s2)
|
void EXT_FUNC PF_changelevel_I(const char *s1, const char *s2)
|
||||||
@ -2646,10 +2646,10 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!filename)
|
if (!filename)
|
||||||
Host_Error("%s: NULL pointer", __FUNCTION__);
|
Host_Error("%s: NULL pointer", __func__);
|
||||||
|
|
||||||
if (PR_IsEmptyString(filename))
|
if (PR_IsEmptyString(filename))
|
||||||
Host_Error("%s: Bad string '%s'", __FUNCTION__, filename);
|
Host_Error("%s: Bad string '%s'", __func__, filename);
|
||||||
|
|
||||||
if (g_psv.state == ss_loading)
|
if (g_psv.state == ss_loading)
|
||||||
{
|
{
|
||||||
@ -2664,7 +2664,7 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
|||||||
++i;
|
++i;
|
||||||
|
|
||||||
if (i >= 512)
|
if (i >= 512)
|
||||||
Host_Error("%s: '%s' overflow", __FUNCTION__, filename);
|
Host_Error("%s: '%s' overflow", __func__, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
cnode->check_type = type;
|
cnode->check_type = type;
|
||||||
@ -2691,7 +2691,7 @@ void EXT_FUNC PF_ForceUnmodified(FORCE_TYPE type, float *mins, float *maxs, cons
|
|||||||
++cnode;
|
++cnode;
|
||||||
++i;
|
++i;
|
||||||
if (i >= 512)
|
if (i >= 512)
|
||||||
Host_Error("%s: '%s' Precache can only be done in spawn functions", __FUNCTION__, filename);
|
Host_Error("%s: '%s' Precache can only be done in spawn functions", __func__, filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +57,9 @@ edict_t *ED_Alloc(void)
|
|||||||
{
|
{
|
||||||
if (!g_psv.max_edicts)
|
if (!g_psv.max_edicts)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: no edicts yet", __FUNCTION__);
|
Sys_Error("%s: no edicts yet", __func__);
|
||||||
}
|
}
|
||||||
Sys_Error("%s: no free edicts", __FUNCTION__);
|
Sys_Error("%s: no free edicts", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use new one
|
// Use new one
|
||||||
@ -221,7 +221,7 @@ char *ED_ParseEdict(char *data, edict_t *ent)
|
|||||||
}
|
}
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
Host_Error("%s: EOF without closing brace", __FUNCTION__);
|
Host_Error("%s: EOF without closing brace", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strncpy(keyname, com_token, ARRAYSIZE(keyname) - 1);
|
Q_strncpy(keyname, com_token, ARRAYSIZE(keyname) - 1);
|
||||||
@ -235,11 +235,11 @@ char *ED_ParseEdict(char *data, edict_t *ent)
|
|||||||
data = COM_Parse(data);
|
data = COM_Parse(data);
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
Host_Error("%s: EOF without closing brace", __FUNCTION__);
|
Host_Error("%s: EOF without closing brace", __func__);
|
||||||
}
|
}
|
||||||
if (com_token[0] == '}')
|
if (com_token[0] == '}')
|
||||||
{
|
{
|
||||||
Host_Error("%s: closing brace without data", __FUNCTION__);
|
Host_Error("%s: closing brace without data", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (className != NULL && !Q_strcmp(className, com_token))
|
if (className != NULL && !Q_strcmp(className, com_token))
|
||||||
@ -300,7 +300,7 @@ void ED_LoadFromFile(char *data)
|
|||||||
}
|
}
|
||||||
if (com_token[0] != '{')
|
if (com_token[0] != '{')
|
||||||
{
|
{
|
||||||
Host_Error("%s: found %s when expecting {", __FUNCTION__, com_token);
|
Host_Error("%s: found %s when expecting {", __func__, com_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ent)
|
if (ent)
|
||||||
@ -353,7 +353,7 @@ edict_t *EDICT_NUM(int n)
|
|||||||
{
|
{
|
||||||
if (n < 0 || n >= g_psv.max_edicts)
|
if (n < 0 || n >= g_psv.max_edicts)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad number %i", __FUNCTION__, n);
|
Sys_Error("%s: bad number %i", __func__, n);
|
||||||
}
|
}
|
||||||
return &g_psv.edicts[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)
|
if (b < 0 || b >= g_psv.num_edicts)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad pointer", __FUNCTION__);
|
Sys_Error("%s: bad pointer", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
@ -397,7 +397,7 @@ bool SuckOutClassname(char *szInputStream, edict_t *pEdict)
|
|||||||
|
|
||||||
if (kvd.fHandled == FALSE)
|
if (kvd.fHandled == FALSE)
|
||||||
{
|
{
|
||||||
Host_Error("%s: parse error", __FUNCTION__);
|
Host_Error("%s: parse error", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -424,7 +424,7 @@ bool SuckOutClassname(char *szInputStream, edict_t *pEdict)
|
|||||||
|
|
||||||
if (kvd.fHandled == FALSE)
|
if (kvd.fHandled == FALSE)
|
||||||
{
|
{
|
||||||
Host_Error("%s: parse error", __FUNCTION__);
|
Host_Error("%s: parse error", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -525,7 +525,7 @@ int EXT_FUNC IndexOfEdict(const edict_t *pEdict)
|
|||||||
if (index < 0 || index > g_psv.max_edicts)
|
if (index < 0 || index > g_psv.max_edicts)
|
||||||
#endif // REHLDS_FIXES
|
#endif // REHLDS_FIXES
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad entity", __FUNCTION__);
|
Sys_Error("%s: bad entity", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
@ -625,7 +625,7 @@ void EXT_FUNC SaveSpawnParms(edict_t *pEdict)
|
|||||||
int eoffset = NUM_FOR_EDICT(pEdict);
|
int eoffset = NUM_FOR_EDICT(pEdict);
|
||||||
if (eoffset < 1 || eoffset > g_psvs.maxclients)
|
if (eoffset < 1 || eoffset > g_psvs.maxclients)
|
||||||
{
|
{
|
||||||
Host_Error("%s: Entity is not a client", __FUNCTION__);
|
Host_Error("%s: Entity is not a client", __func__);
|
||||||
}
|
}
|
||||||
// Nothing more for this function even on client-side
|
// Nothing more for this function even on client-side
|
||||||
}
|
}
|
||||||
|
@ -628,7 +628,7 @@ hull_t *R_StudioHull(model_t *pModel, float frame, int sequence, const vec_t *an
|
|||||||
if (r_cachestudio.value != 0)
|
if (r_cachestudio.value != 0)
|
||||||
{
|
{
|
||||||
#ifdef SWDS
|
#ifdef SWDS
|
||||||
Sys_Error("%s: Studio state caching is not used on server", __FUNCTION__);
|
Sys_Error("%s: Studio state caching is not used on server", __func__);
|
||||||
#endif
|
#endif
|
||||||
// TODO: Reverse for client-side
|
// 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)
|
if (r_cachestudio.value != 0)
|
||||||
{
|
{
|
||||||
#ifdef SWDS
|
#ifdef SWDS
|
||||||
Sys_Error("%s: Studio state caching is not used on server", __FUNCTION__);
|
Sys_Error("%s: Studio state caching is not used on server", __func__);
|
||||||
#endif
|
#endif
|
||||||
// TODO: Reverse for client-side
|
// TODO: Reverse for client-side
|
||||||
// R_AddToStudioCache(float frame,
|
// R_AddToStudioCache(float frame,
|
||||||
|
@ -327,7 +327,7 @@ delta_t *SV_LookupDelta(char *name)
|
|||||||
p = p->next;
|
p = p->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Error("%s: Couldn't find delta for %s\n", __FUNCTION__, name);
|
Sys_Error("%s: Couldn't find delta for %s\n", __func__, name);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ void SV_ReallocateDynamicData(void)
|
|||||||
{
|
{
|
||||||
if (!g_psv.max_edicts)
|
if (!g_psv.max_edicts)
|
||||||
{
|
{
|
||||||
Con_DPrintf("%s: sv.max_edicts == 0\n", __FUNCTION__);
|
Con_DPrintf("%s: sv.max_edicts == 0\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,22 +784,22 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
|||||||
|
|
||||||
if (volume < 0 || volume > 255)
|
if (volume < 0 || volume > 255)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: volume = %i", __FUNCTION__, volume);
|
Con_Printf("%s: volume = %i", __func__, volume);
|
||||||
volume = (volume < 0) ? 0 : 255;
|
volume = (volume < 0) ? 0 : 255;
|
||||||
}
|
}
|
||||||
if (attenuation < 0.0f || attenuation > 4.0f)
|
if (attenuation < 0.0f || attenuation > 4.0f)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: attenuation = %f", __FUNCTION__, attenuation);
|
Con_Printf("%s: attenuation = %f", __func__, attenuation);
|
||||||
attenuation = (attenuation < 0.0f) ? 0.0f : 4.0f;
|
attenuation = (attenuation < 0.0f) ? 0.0f : 4.0f;
|
||||||
}
|
}
|
||||||
if (channel < 0 || channel > 7)
|
if (channel < 0 || channel > 7)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: channel = %i", __FUNCTION__, channel);
|
Con_Printf("%s: channel = %i", __func__, channel);
|
||||||
channel = (channel < 0) ? CHAN_AUTO : CHAN_NETWORKVOICE_BASE;
|
channel = (channel < 0) ? CHAN_AUTO : CHAN_NETWORKVOICE_BASE;
|
||||||
}
|
}
|
||||||
if (pitch < 0 || pitch > 255)
|
if (pitch < 0 || pitch > 255)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: pitch = %i", __FUNCTION__, pitch);
|
Con_Printf("%s: pitch = %i", __func__, pitch);
|
||||||
pitch = (pitch < 0) ? 0 : 255;
|
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);
|
sound_num = Q_atoi(sample + 1);
|
||||||
if (sound_num >= CVOXFILESENTENCEMAX)
|
if (sound_num >= CVOXFILESENTENCEMAX)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: invalid sentence number: %s", __FUNCTION__, sample + 1);
|
Con_Printf("%s: invalid sentence number: %s", __func__, sample + 1);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -825,7 +825,7 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
|
|||||||
sound_num = SV_LookupSoundIndex(sample);
|
sound_num = SV_LookupSoundIndex(sample);
|
||||||
if (!sound_num || !g_psv.sound_precache[sound_num])
|
if (!sound_num || !g_psv.sound_precache[sound_num])
|
||||||
{
|
{
|
||||||
Con_Printf("%s: %s not precached (%d)\n", __FUNCTION__, sample, sound_num);
|
Con_Printf("%s: %s not precached (%d)\n", __func__, sample, sound_num);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -934,7 +934,7 @@ void SV_AddSampleToHashedLookupTable(const char *pszSample, int iSampleIndex)
|
|||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
if (index == starting_index)
|
if (index == starting_index)
|
||||||
Sys_Error("%s: NO FREE SLOTS IN SOUND LOOKUP TABLE", __FUNCTION__);
|
Sys_Error("%s: NO FREE SLOTS IN SOUND LOOKUP TABLE", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_psv.sound_precache_hashedlookup[index] = iSampleIndex;
|
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)
|
if (adr == NULL)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Null address\n", __FUNCTION__);
|
Sys_Error("%s: Null address\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nProtocol == PROTOCOL_VERSION)
|
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)
|
int SV_CheckChallenge(netadr_t *adr, int nChallengeValue)
|
||||||
{
|
{
|
||||||
if (!adr)
|
if (!adr)
|
||||||
Sys_Error("%s: Null address\n", __FUNCTION__);
|
Sys_Error("%s: Null address\n", __func__);
|
||||||
|
|
||||||
if (NET_IsLocalAddress(*adr))
|
if (NET_IsLocalAddress(*adr))
|
||||||
return 1;
|
return 1;
|
||||||
@ -2655,19 +2655,19 @@ void SV_ResetModInfo(void)
|
|||||||
nFileSize = FS_Size(hLibListFile);
|
nFileSize = FS_Size(hLibListFile);
|
||||||
if (!nFileSize || (signed int)nFileSize > 256 * 1024)
|
if (!nFileSize || (signed int)nFileSize > 256 * 1024)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Game listing file size is bogus [%s: size %i]", __FUNCTION__, "liblist.gam", nFileSize);
|
Sys_Error("%s: Game listing file size is bogus [%s: size %i]", __func__, "liblist.gam", nFileSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
pszInputStream = (char *)Mem_Malloc(nFileSize + 1);
|
pszInputStream = (char *)Mem_Malloc(nFileSize + 1);
|
||||||
if (!pszInputStream)
|
if (!pszInputStream)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Could not allocate space for game listing file of %i bytes", __FUNCTION__, nFileSize + 1);
|
Sys_Error("%s: Could not allocate space for game listing file of %i bytes", __func__, nFileSize + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
nBytesRead = FS_Read(pszInputStream, nFileSize, 1, hLibListFile);
|
nBytesRead = FS_Read(pszInputStream, nFileSize, 1, hLibListFile);
|
||||||
if (nBytesRead != nFileSize)
|
if (nBytesRead != nFileSize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Error reading in game listing file, expected %i bytes, read %i", __FUNCTION__, nFileSize, nBytesRead);
|
Sys_Error("%s: Error reading in game listing file, expected %i bytes, read %i", __func__, nFileSize, nBytesRead);
|
||||||
}
|
}
|
||||||
|
|
||||||
pszInputStream[nFileSize] = 0;
|
pszInputStream[nFileSize] = 0;
|
||||||
@ -5064,7 +5064,7 @@ int SV_ModelIndex(const char *name)
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Sys_Error("%s: SV_ModelIndex: model %s not precached", __FUNCTION__, name);
|
Sys_Error("%s: SV_ModelIndex: model %s not precached", __func__, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EXT_FUNC SV_AddResource(resourcetype_t type, const char *name, int size, unsigned char flags, int index)
|
void EXT_FUNC SV_AddResource(resourcetype_t type, const char *name, int size, unsigned char flags, int index)
|
||||||
@ -5076,7 +5076,7 @@ void EXT_FUNC SV_AddResource(resourcetype_t type, const char *name, int size, un
|
|||||||
if (g_psv.num_resources >= MAX_RESOURCE_LIST)
|
if (g_psv.num_resources >= MAX_RESOURCE_LIST)
|
||||||
#endif // REHLDS_FIXES
|
#endif // REHLDS_FIXES
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Too many resources on server.", __FUNCTION__);
|
Sys_Error("%s: Too many resources on server.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
@ -5552,7 +5552,7 @@ void SV_BroadcastCommand(char *fmt, ...)
|
|||||||
MSG_WriteByte(&msg, svc_stufftext);
|
MSG_WriteByte(&msg, svc_stufftext);
|
||||||
MSG_WriteString(&msg, string);
|
MSG_WriteString(&msg, string);
|
||||||
if (msg.flags & SIZEBUF_OVERFLOWED)
|
if (msg.flags & SIZEBUF_OVERFLOWED)
|
||||||
Sys_Error("%s: Overflowed on %s, %i is max size\n", __FUNCTION__, string, msg.maxsize);
|
Sys_Error("%s: Overflowed on %s, %i is max size\n", __func__, string, msg.maxsize);
|
||||||
|
|
||||||
for (int i = 0; i < g_psvs.maxclients; ++i)
|
for (int i = 0; i < g_psvs.maxclients; ++i)
|
||||||
{
|
{
|
||||||
@ -6463,7 +6463,7 @@ void SV_BanId_f(void)
|
|||||||
}
|
}
|
||||||
if (id == NULL)
|
if (id == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Couldn't find #userid %u\n", __FUNCTION__, search);
|
Con_Printf("%s: Couldn't find #userid %u\n", __func__, search);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6492,7 +6492,7 @@ void SV_BanId_f(void)
|
|||||||
|
|
||||||
if (id == NULL)
|
if (id == NULL)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Couldn't resolve uniqueid %s.\n", __FUNCTION__, idstring);
|
Con_Printf("%s: Couldn't resolve uniqueid %s.\n", __func__, idstring);
|
||||||
Con_Printf("Usage: banid <minutes> <uniqueid or #userid> { kick }\n");
|
Con_Printf("Usage: banid <minutes> <uniqueid or #userid> { kick }\n");
|
||||||
Con_Printf("Use 0 minutes for permanent\n");
|
Con_Printf("Use 0 minutes for permanent\n");
|
||||||
return;
|
return;
|
||||||
@ -6510,7 +6510,7 @@ void SV_BanId_f(void)
|
|||||||
{
|
{
|
||||||
if (numuserfilters >= MAX_USERFILTERS)
|
if (numuserfilters >= MAX_USERFILTERS)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: User filter list is full\n", __FUNCTION__);
|
Con_Printf("%s: User filter list is full\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
numuserfilters++;
|
numuserfilters++;
|
||||||
@ -6797,7 +6797,7 @@ void SV_RemoveId_f(void)
|
|||||||
|
|
||||||
if (!idstring[0])
|
if (!idstring[0])
|
||||||
{
|
{
|
||||||
Con_Printf("%s: Id string is empty!\n", __FUNCTION__);
|
Con_Printf("%s: Id string is empty!\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6806,7 +6806,7 @@ void SV_RemoveId_f(void)
|
|||||||
int slot = Q_atoi(&idstring[1]);
|
int slot = Q_atoi(&idstring[1]);
|
||||||
if (slot <= 0 || slot > numuserfilters)
|
if (slot <= 0 || slot > numuserfilters)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: invalid slot #%i\n", __FUNCTION__, slot);
|
Con_Printf("%s: invalid slot #%i\n", __func__, slot);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
slot--;
|
slot--;
|
||||||
@ -7650,7 +7650,7 @@ void SV_RegisterDelta(char *name, char *loadfile)
|
|||||||
{
|
{
|
||||||
delta_t *pdesc = NULL;
|
delta_t *pdesc = NULL;
|
||||||
if (!DELTA_Load(name, &pdesc, loadfile))
|
if (!DELTA_Load(name, &pdesc, loadfile))
|
||||||
Sys_Error("%s: Error parsing %s!!!\n", __FUNCTION__, loadfile);
|
Sys_Error("%s: Error parsing %s!!!\n", __func__, loadfile);
|
||||||
|
|
||||||
delta_info_t *p = (delta_info_t *)Mem_ZeroMalloc(sizeof(delta_info_t));
|
delta_info_t *p = (delta_info_t *)Mem_ZeroMalloc(sizeof(delta_info_t));
|
||||||
p->loadfile = Mem_Strdup(loadfile);
|
p->loadfile = Mem_Strdup(loadfile);
|
||||||
@ -7677,32 +7677,32 @@ void SV_InitDeltas(void)
|
|||||||
|
|
||||||
g_pplayerdelta = SV_LookupDelta("entity_state_player_t");
|
g_pplayerdelta = SV_LookupDelta("entity_state_player_t");
|
||||||
if (!g_pplayerdelta)
|
if (!g_pplayerdelta)
|
||||||
Sys_Error("%s: No entity_state_player_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No entity_state_player_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
g_pentitydelta = SV_LookupDelta("entity_state_t");
|
g_pentitydelta = SV_LookupDelta("entity_state_t");
|
||||||
if (!g_pentitydelta)
|
if (!g_pentitydelta)
|
||||||
Sys_Error("%s: No entity_state_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No entity_state_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
g_pcustomentitydelta = SV_LookupDelta("custom_entity_state_t");
|
g_pcustomentitydelta = SV_LookupDelta("custom_entity_state_t");
|
||||||
if (!g_pcustomentitydelta)
|
if (!g_pcustomentitydelta)
|
||||||
Sys_Error("%s: No custom_entity_state_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No custom_entity_state_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
g_pclientdelta = SV_LookupDelta("clientdata_t");
|
g_pclientdelta = SV_LookupDelta("clientdata_t");
|
||||||
if (!g_pclientdelta)
|
if (!g_pclientdelta)
|
||||||
Sys_Error("%s: No clientdata_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No clientdata_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
g_pweapondelta = SV_LookupDelta("weapon_data_t");
|
g_pweapondelta = SV_LookupDelta("weapon_data_t");
|
||||||
if (!g_pweapondelta)
|
if (!g_pweapondelta)
|
||||||
Sys_Error("%s: No weapon_data_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No weapon_data_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
g_peventdelta = SV_LookupDelta("event_t");
|
g_peventdelta = SV_LookupDelta("event_t");
|
||||||
if (!g_peventdelta)
|
if (!g_peventdelta)
|
||||||
Sys_Error("%s: No event_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No event_t encoder on server!\n", __func__);
|
||||||
|
|
||||||
#ifdef REHLDS_OPT_PEDANTIC
|
#ifdef REHLDS_OPT_PEDANTIC
|
||||||
g_pusercmddelta = SV_LookupDelta("usercmd_t");
|
g_pusercmddelta = SV_LookupDelta("usercmd_t");
|
||||||
if (!g_pusercmddelta)
|
if (!g_pusercmddelta)
|
||||||
Sys_Error("%s: No usercmd_t encoder on server!\n", __FUNCTION__);
|
Sys_Error("%s: No usercmd_t encoder on server!\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(REHLDS_OPT_PEDANTIC) || defined(REHLDS_FIXES)
|
#if defined(REHLDS_OPT_PEDANTIC) || defined(REHLDS_FIXES)
|
||||||
|
@ -255,7 +255,7 @@ int SV_FlyMove(edict_t *ent, float time, trace_t *steptrace)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (!trace.ent)
|
if (!trace.ent)
|
||||||
Sys_Error("%s: !trace.ent", __FUNCTION__);
|
Sys_Error("%s: !trace.ent", __func__);
|
||||||
|
|
||||||
if (trace.plane.normal[2] > 0.7)
|
if (trace.plane.normal[2] > 0.7)
|
||||||
{
|
{
|
||||||
@ -621,7 +621,7 @@ int SV_PushRotate(edict_t *pusher, float movetime)
|
|||||||
++num_moved;
|
++num_moved;
|
||||||
|
|
||||||
if (num_moved >= g_psv.max_edicts)
|
if (num_moved >= g_psv.max_edicts)
|
||||||
Sys_Error("%s: Out of edicts in simulator!\n", __FUNCTION__);
|
Sys_Error("%s: Out of edicts in simulator!\n", __func__);
|
||||||
|
|
||||||
vec3_t start, end, push, move;
|
vec3_t start, end, push, move;
|
||||||
|
|
||||||
@ -1392,7 +1392,7 @@ void SV_Physics(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Sys_Error("%s: %s bad movetype %d", __FUNCTION__, &pr_strings[ent->v.classname], ent->v.movetype);
|
Sys_Error("%s: %s bad movetype %d", __func__, &pr_strings[ent->v.classname], ent->v.movetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ent->v.flags & FL_KILLME)
|
if (ent->v.flags & FL_KILLME)
|
||||||
|
@ -90,7 +90,7 @@ void SV_ClearResourceLists(client_t *cl)
|
|||||||
{
|
{
|
||||||
if (!cl)
|
if (!cl)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: SV_ClearResourceLists with NULL client!", __FUNCTION__);
|
Sys_Error("%s: SV_ClearResourceLists with NULL client!", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
SV_ClearResourceList(&cl->resourcesneeded);
|
SV_ClearResourceList(&cl->resourcesneeded);
|
||||||
@ -165,7 +165,7 @@ void SV_Customization(client_t *pPlayer, resource_t *pResource, qboolean bSkipPl
|
|||||||
}
|
}
|
||||||
if (i == g_psvs.maxclients)
|
if (i == g_psvs.maxclients)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Couldn't find player index for customization.", __FUNCTION__);
|
Sys_Error("%s: Couldn't find player index for customization.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
nPlayerNumber = i;
|
nPlayerNumber = i;
|
||||||
|
@ -315,7 +315,7 @@ int EXT_FUNC SV_TransferConsistencyInfo_internal(void)
|
|||||||
vec3_t maxs;
|
vec3_t maxs;
|
||||||
|
|
||||||
if (!R_GetStudioBounds(filename, mins, maxs))
|
if (!R_GetStudioBounds(filename, mins, maxs))
|
||||||
Host_Error("%s: Server unable to get bounds for %s\n", __FUNCTION__, filename);
|
Host_Error("%s: Server unable to get bounds for %s\n", __func__, filename);
|
||||||
|
|
||||||
Q_memcpy(&r->rguc_reserved[1], mins, sizeof(mins));
|
Q_memcpy(&r->rguc_reserved[1], mins, sizeof(mins));
|
||||||
Q_memcpy(&r->rguc_reserved[13], maxs, sizeof(maxs));
|
Q_memcpy(&r->rguc_reserved[13], maxs, sizeof(maxs));
|
||||||
|
@ -263,7 +263,7 @@ void __cdecl Sys_InitHardwareTimer()
|
|||||||
Sys_InitFPUControlWords();
|
Sys_InitFPUControlWords();
|
||||||
|
|
||||||
if (!CRehldsPlatformHolder::get()->QueryPerfFreq(&perfFreq))
|
if (!CRehldsPlatformHolder::get()->QueryPerfFreq(&perfFreq))
|
||||||
Sys_Error("%s: No hardware timer available", __FUNCTION__);
|
Sys_Error("%s: No hardware timer available", __func__);
|
||||||
|
|
||||||
perfHighPart = perfFreq.HighPart;
|
perfHighPart = perfFreq.HighPart;
|
||||||
perfLowPart = perfFreq.LowPart;
|
perfLowPart = perfFreq.LowPart;
|
||||||
@ -308,7 +308,7 @@ const char *Sys_FindFirst(const char *path, char *basename)
|
|||||||
{
|
{
|
||||||
if (g_hfind != -1)
|
if (g_hfind != -1)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called without close", __FUNCTION__);
|
Sys_Error("%s: called without close", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *psz = FS_FindFirst(path, &g_hfind, 0);
|
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?
|
//const char *psz;//unused?
|
||||||
if (g_hfind != -1)
|
if (g_hfind != -1)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: called without close", __FUNCTION__);
|
Sys_Error("%s: called without close", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FS_FindFirst(path, &g_hfind, pathid);
|
return FS_FindFirst(path, &g_hfind, pathid);
|
||||||
@ -406,7 +406,7 @@ NOXREF void Sys_MakeCodeWriteable(uint32 startaddr, uint32 length)
|
|||||||
NOXREFCHECK;
|
NOXREFCHECK;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!VirtualProtect((LPVOID)startaddr, length, PAGE_EXECUTE_READWRITE, (PDWORD)&length))
|
if (!VirtualProtect((LPVOID)startaddr, length, PAGE_EXECUTE_READWRITE, (PDWORD)&length))
|
||||||
Sys_Error("%s: Protection change failed.", __FUNCTION__);
|
Sys_Error("%s: Protection change failed.", __func__);
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -905,15 +905,15 @@ void LoadEntityDLLs(const char *szBaseDir)
|
|||||||
nFileSize = FS_Size(hLibListFile);
|
nFileSize = FS_Size(hLibListFile);
|
||||||
nFileSize2 = nFileSize;
|
nFileSize2 = nFileSize;
|
||||||
if (!nFileSize || (signed int)nFileSize > 262144)
|
if (!nFileSize || (signed int)nFileSize > 262144)
|
||||||
Sys_Error("%s: Game listing file size is bogus [%s: size %i]", __FUNCTION__, "liblist.gam", nFileSize);
|
Sys_Error("%s: Game listing file size is bogus [%s: size %i]", __func__, "liblist.gam", nFileSize);
|
||||||
|
|
||||||
pszInputStream = (char *)Mem_Malloc(nFileSize + 1);
|
pszInputStream = (char *)Mem_Malloc(nFileSize + 1);
|
||||||
if (!pszInputStream)
|
if (!pszInputStream)
|
||||||
Sys_Error("%s: Could not allocate space for game listing file of %i bytes", __FUNCTION__, nFileSize2 + 1);
|
Sys_Error("%s: Could not allocate space for game listing file of %i bytes", __func__, nFileSize2 + 1);
|
||||||
|
|
||||||
nBytesRead = FS_Read(pszInputStream, nFileSize2, 1, hLibListFile);
|
nBytesRead = FS_Read(pszInputStream, nFileSize2, 1, hLibListFile);
|
||||||
if (nBytesRead != nFileSize2)
|
if (nBytesRead != nFileSize2)
|
||||||
Sys_Error("%s: Error reading in game listing file, expected %i bytes, read %i", __FUNCTION__, nFileSize2, nBytesRead);
|
Sys_Error("%s: Error reading in game listing file, expected %i bytes, read %i", __func__, nFileSize2, nBytesRead);
|
||||||
|
|
||||||
pszInputStream[nFileSize2] = 0;
|
pszInputStream[nFileSize2] = 0;
|
||||||
pStreamPos = pszInputStream;
|
pStreamPos = pszInputStream;
|
||||||
|
@ -42,12 +42,12 @@
|
|||||||
#define __LINE__AS_STRING __HACK_LINE_AS_STRING__(__LINE__) //Gives you the line number in constant string form
|
#define __LINE__AS_STRING __HACK_LINE_AS_STRING__(__LINE__) //Gives you the line number in constant string form
|
||||||
|
|
||||||
#if defined _MSC_VER || defined __INTEL_COMPILER
|
#if defined _MSC_VER || defined __INTEL_COMPILER
|
||||||
#define NOXREFCHECK int __retAddr; __asm { __asm mov eax, [ebp + 4] __asm mov __retAddr, eax }; Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __FUNCTION__, __retAddr)
|
#define NOXREFCHECK int __retAddr; __asm { __asm mov eax, [ebp + 4] __asm mov __retAddr, eax }; Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __func__, __retAddr)
|
||||||
#else
|
#else
|
||||||
// For EBP based stack
|
// For EBP based stack (older gcc) (uncomment version apropriate for your compiler)
|
||||||
#define NOXREFCHECK int __retAddr; __asm__ __volatile__("movl 4(%%ebp), %%eax;" "movl %%eax, %0":"=r"(__retAddr)::"%eax"); Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __FUNCTION__, __retAddr);
|
//#define NOXREFCHECK int __retAddr; __asm__ __volatile__("movl 4(%%ebp), %%eax;" "movl %%eax, %0":"=r"(__retAddr)::"%eax"); Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __func__, __retAddr);
|
||||||
// For ESP based stack
|
// For ESP based stack (newer gcc) (uncomment version apropriate for your compiler)
|
||||||
#define NOXREFCHECK int __retAddr; __asm__ __volatile__("movl 16(%%esp), %%eax;" "movl %%eax, %0":"=r"(__retAddr)::"%eax"); Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __FUNCTION__, __retAddr);
|
#define NOXREFCHECK int __retAddr; __asm__ __volatile__("movl 16(%%esp), %%eax;" "movl %%eax, %0":"=r"(__retAddr)::"%eax"); Sys_Error("[NOXREFCHECK]: %s: (" __FILE__ ":" __LINE__AS_STRING ") NOXREF, but called from 0x%.08x", __func__, __retAddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ void Sys_CheckOSVersion(void)
|
|||||||
Q_memset(&verInfo, 0, sizeof(verInfo));
|
Q_memset(&verInfo, 0, sizeof(verInfo));
|
||||||
verInfo.dwOSVersionInfoSize = sizeof(verInfo);
|
verInfo.dwOSVersionInfoSize = sizeof(verInfo);
|
||||||
if (!GetVersionEx(&verInfo))
|
if (!GetVersionEx(&verInfo))
|
||||||
Sys_Error("%s: Couldn't get OS info", __FUNCTION__);
|
Sys_Error("%s: Couldn't get OS info", __func__);
|
||||||
|
|
||||||
g_WinNTOrHigher = verInfo.dwMajorVersion >= 4;
|
g_WinNTOrHigher = verInfo.dwMajorVersion >= 4;
|
||||||
if (verInfo.dwPlatformId == 1 && verInfo.dwMajorVersion == 4)
|
if (verInfo.dwPlatformId == 1 && verInfo.dwMajorVersion == 4)
|
||||||
@ -348,7 +348,7 @@ void Sys_InitMemory(void)
|
|||||||
if (lpBuffer.dwTotalPhys)
|
if (lpBuffer.dwTotalPhys)
|
||||||
{
|
{
|
||||||
if (lpBuffer.dwTotalPhys < FIFTEEN_MB)
|
if (lpBuffer.dwTotalPhys < FIFTEEN_MB)
|
||||||
Sys_Error("%s: Available memory less than 15MB!!! %i", __FUNCTION__, host_parms.memsize);
|
Sys_Error("%s: Available memory less than 15MB!!! %i", __func__, host_parms.memsize);
|
||||||
|
|
||||||
host_parms.memsize = (int)(lpBuffer.dwTotalPhys >> 1);
|
host_parms.memsize = (int)(lpBuffer.dwTotalPhys >> 1);
|
||||||
if (host_parms.memsize < MINIMUM_WIN_MEMORY)
|
if (host_parms.memsize < MINIMUM_WIN_MEMORY)
|
||||||
@ -376,7 +376,7 @@ void Sys_InitMemory(void)
|
|||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
if (!host_parms.membase)
|
if (!host_parms.membase)
|
||||||
Sys_Error("%s: Unable to allocate %.2f MB\n", __FUNCTION__, (float)host_parms.memsize / (1024.0f * 1024.0f));
|
Sys_Error("%s: Unable to allocate %.2f MB\n", __func__, (float)host_parms.memsize / (1024.0f * 1024.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sys_ShutdownMemory(void)
|
void Sys_ShutdownMemory(void)
|
||||||
|
@ -88,7 +88,7 @@ void ForceReloadProfile()
|
|||||||
//SDL_GL_SetSwapInterval((gl_vsync.value <= 0.0) - 1);
|
//SDL_GL_SetSwapInterval((gl_vsync.value <= 0.0) - 1);
|
||||||
if (g_pcls.state != ca_dedicated)
|
if (g_pcls.state != ca_dedicated)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Only dedicated mode is supported", __FUNCTION__);
|
Sys_Error("%s: Only dedicated mode is supported", __func__);
|
||||||
/*
|
/*
|
||||||
v0 = GetRateRegistrySetting(rate.string);
|
v0 = GetRateRegistrySetting(rate.string);
|
||||||
Q_strncpy(szRate, v0, 0x20u);
|
Q_strncpy(szRate, v0, 0x20u);
|
||||||
|
@ -55,7 +55,7 @@ cvar_t r_wadtextures;
|
|||||||
void SafeRead(FileHandle_t f, void *buffer, int count)
|
void SafeRead(FileHandle_t f, void *buffer, int count)
|
||||||
{
|
{
|
||||||
if (FS_Read(buffer, count, 1, f) != count)
|
if (FS_Read(buffer, count, 1, f) != count)
|
||||||
Sys_Error("%s: File read failure", __FUNCTION__);
|
Sys_Error("%s: File read failure", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CleanupName(char *in, char *out)
|
void CleanupName(char *in, char *out)
|
||||||
@ -122,12 +122,12 @@ qboolean TEX_InitFromWad(char *path)
|
|||||||
texfile = FS_Open(wadPath, "rb");
|
texfile = FS_Open(wadPath, "rb");
|
||||||
texfiles[nTexFiles++] = texfile;
|
texfiles[nTexFiles++] = texfile;
|
||||||
if (!texfile)
|
if (!texfile)
|
||||||
Sys_Error("%s: couldn't open %s\n", __FUNCTION__, wadPath);
|
Sys_Error("%s: couldn't open %s\n", __func__, wadPath);
|
||||||
|
|
||||||
Con_DPrintf("Using WAD File: %s\n", wadPath);
|
Con_DPrintf("Using WAD File: %s\n", wadPath);
|
||||||
SafeRead(texfile, &header, 12);
|
SafeRead(texfile, &header, 12);
|
||||||
if (Q_strncmp(header.identification, "WAD2", 4) && Q_strncmp(header.identification, "WAD3", 4))
|
if (Q_strncmp(header.identification, "WAD2", 4) && Q_strncmp(header.identification, "WAD3", 4))
|
||||||
Sys_Error("%s: %s isn't a wadfile", __FUNCTION__, wadPath);
|
Sys_Error("%s: %s isn't a wadfile", __func__, wadPath);
|
||||||
|
|
||||||
header.numlumps = LittleLong(header.numlumps);
|
header.numlumps = LittleLong(header.numlumps);
|
||||||
header.infotableofs = LittleLong(header.infotableofs);
|
header.infotableofs = LittleLong(header.infotableofs);
|
||||||
@ -196,7 +196,7 @@ int FindMiptex(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nummiptex == 512)
|
if (nummiptex == 512)
|
||||||
Sys_Error("%s: Exceeded MAX_MAP_TEXTURES", __FUNCTION__);
|
Sys_Error("%s: Exceeded MAX_MAP_TEXTURES", __func__);
|
||||||
|
|
||||||
Q_strncpy(miptex[i], name, 63);
|
Q_strncpy(miptex[i], name, 63);
|
||||||
miptex[i][63] = 0;
|
miptex[i][63] = 0;
|
||||||
|
@ -347,7 +347,7 @@ NOXREF void TextMessageParse(unsigned char *pMemFile, int fileSize)
|
|||||||
while (memfgets(pMemFile, fileSize, &filePos, buf, 512) != NULL)
|
while (memfgets(pMemFile, fileSize, &filePos, buf, 512) != NULL)
|
||||||
{
|
{
|
||||||
if(messageCount >= MAX_MESSAGES)
|
if(messageCount >= MAX_MESSAGES)
|
||||||
Sys_Error("%s: messageCount >= MAX_MESSAGES", __FUNCTION__);
|
Sys_Error("%s: messageCount >= MAX_MESSAGES", __func__);
|
||||||
|
|
||||||
TrimSpace(buf, trim);
|
TrimSpace(buf, trim);
|
||||||
switch (mode)
|
switch (mode)
|
||||||
|
@ -69,8 +69,8 @@ int W_LoadWadFile(char *filename)
|
|||||||
if (!wad->wad_base)
|
if (!wad->wad_base)
|
||||||
{
|
{
|
||||||
if (!slot)
|
if (!slot)
|
||||||
Sys_Error("%s: couldn't load %s", __FUNCTION__, filename);
|
Sys_Error("%s: couldn't load %s", __func__, filename);
|
||||||
Con_Printf("WARNING: %s, couldn't load %s\n", __FUNCTION__, filename);
|
Con_Printf("WARNING: %s, couldn't load %s\n", __func__, filename);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ int W_LoadWadFile(char *filename)
|
|||||||
wad->wadname[sizeof(wad->wadname) - 1] = 0;
|
wad->wadname[sizeof(wad->wadname) - 1] = 0;
|
||||||
wad->loaded = TRUE;
|
wad->loaded = TRUE;
|
||||||
if (*(uint32 *)header->identification != MAKEID('W', 'A', 'D', '3'))
|
if (*(uint32 *)header->identification != MAKEID('W', 'A', 'D', '3'))
|
||||||
Sys_Error("%s: Wad file %s doesn't have WAD3 id\n", __FUNCTION__, filename);
|
Sys_Error("%s: Wad file %s doesn't have WAD3 id\n", __func__, filename);
|
||||||
wad->wad_numlumps = LittleLong(header->numlumps);
|
wad->wad_numlumps = LittleLong(header->numlumps);
|
||||||
|
|
||||||
lumpinfo_t * lump_p = (lumpinfo_t *)&wad->wad_base[LittleLong(header->infotableofs)];
|
lumpinfo_t * lump_p = (lumpinfo_t *)&wad->wad_base[LittleLong(header->infotableofs)];
|
||||||
@ -112,7 +112,7 @@ lumpinfo_t *W_GetLumpinfo(int wad, char *name, qboolean doerror)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doerror)
|
if (doerror)
|
||||||
Sys_Error("%s: %s not found", __FUNCTION__, name);
|
Sys_Error("%s: %s not found", __func__, name);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ NOXREF void *W_GetLumpNum(int wad, int num)
|
|||||||
NOXREFCHECK;
|
NOXREFCHECK;
|
||||||
lumpinfo_t *lump;
|
lumpinfo_t *lump;
|
||||||
if (num < 0 || num > wads[wad].wad_numlumps)
|
if (num < 0 || num > wads[wad].wad_numlumps)
|
||||||
Sys_Error("%s: bad number: %i", __FUNCTION__, num);
|
Sys_Error("%s: bad number: %i", __func__, num);
|
||||||
|
|
||||||
lump = wads[wad].wad_lumps;
|
lump = wads[wad].wad_lumps;
|
||||||
return (void *)&wads[wad].wad_base[lump->filepos];
|
return (void *)&wads[wad].wad_base[lump->filepos];
|
||||||
|
@ -164,7 +164,7 @@ struct hull_s *SV_HullForBsp(edict_t *ent, const vec_t *mins, const vec_t *maxs,
|
|||||||
|
|
||||||
model = Mod_Handle(ent->v.modelindex);
|
model = Mod_Handle(ent->v.modelindex);
|
||||||
if (!model || model->type != mod_brush)
|
if (!model || model->type != mod_brush)
|
||||||
Sys_Error("%s: Hit a %s with no model (%s)", __FUNCTION__, &pr_strings[ent->v.classname], &pr_strings[ent->v.model]);
|
Sys_Error("%s: Hit a %s with no model (%s)", __func__, &pr_strings[ent->v.classname], &pr_strings[ent->v.model]);
|
||||||
|
|
||||||
float xSize = maxs[0] - mins[0];
|
float xSize = maxs[0] - mins[0];
|
||||||
if (xSize > 8.0f)
|
if (xSize > 8.0f)
|
||||||
@ -220,7 +220,7 @@ hull_t *SV_HullForEntity(edict_t *ent, const vec_t *mins, const vec_t *maxs, vec
|
|||||||
if (ent->v.solid == SOLID_BSP)
|
if (ent->v.solid == SOLID_BSP)
|
||||||
{
|
{
|
||||||
if (ent->v.movetype != MOVETYPE_PUSH && ent->v.movetype != MOVETYPE_PUSHSTEP)
|
if (ent->v.movetype != MOVETYPE_PUSH && ent->v.movetype != MOVETYPE_PUSHSTEP)
|
||||||
Sys_Error("%s: SOLID_BSP without MOVETYPE_PUSH", __FUNCTION__);
|
Sys_Error("%s: SOLID_BSP without MOVETYPE_PUSH", __func__);
|
||||||
|
|
||||||
return SV_HullForBsp(ent, mins, maxs, offset);
|
return SV_HullForBsp(ent, mins, maxs, offset);
|
||||||
}
|
}
|
||||||
@ -602,7 +602,7 @@ int SV_HullPointContents(hull_t *hull, int num, const vec_t *p)
|
|||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
if (hull->firstclipnode > i || hull->lastclipnode < i)
|
if (hull->firstclipnode > i || hull->lastclipnode < i)
|
||||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
Sys_Error("%s: bad node number", __func__);
|
||||||
node = &hull->clipnodes[i];
|
node = &hull->clipnodes[i];
|
||||||
plane = &hull->planes[node->planenum];
|
plane = &hull->planes[node->planenum];
|
||||||
if (plane->type > 2)
|
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 >= 0)
|
||||||
{
|
{
|
||||||
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
||||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
Sys_Error("%s: bad node number", __func__);
|
||||||
|
|
||||||
node = &hull->clipnodes[num];
|
node = &hull->clipnodes[num];
|
||||||
plane = &hull->planes[hull->clipnodes[num].planenum];
|
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;
|
pdif = p2f - p1f;
|
||||||
|
|
||||||
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
if (num < hull->firstclipnode || num > hull->lastclipnode || !hull->planes)
|
||||||
Sys_Error("%s: bad node number", __FUNCTION__);
|
Sys_Error("%s: bad node number", __func__);
|
||||||
|
|
||||||
node = &hull->clipnodes[num];
|
node = &hull->clipnodes[num];
|
||||||
plane = &hull->planes[hull->clipnodes[num].planenum];
|
plane = &hull->planes[hull->clipnodes[num].planenum];
|
||||||
@ -1185,7 +1185,7 @@ void SV_ClipToLinks(areanode_t *node, moveclip_t *clip)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (touch->v.solid == SOLID_TRIGGER)
|
if (touch->v.solid == SOLID_TRIGGER)
|
||||||
Sys_Error("%s: Trigger in clipping list", __FUNCTION__);
|
Sys_Error("%s: Trigger in clipping list", __func__);
|
||||||
|
|
||||||
if (gNewDLLFunctions.pfnShouldCollide && !gNewDLLFunctions.pfnShouldCollide(touch, clip->passedict))
|
if (gNewDLLFunctions.pfnShouldCollide && !gNewDLLFunctions.pfnShouldCollide(touch, clip->passedict))
|
||||||
#ifdef REHLDS_FIXES
|
#ifdef REHLDS_FIXES
|
||||||
|
@ -98,19 +98,19 @@ void Z_Free(void *ptr)
|
|||||||
{
|
{
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: NULL pointer", __FUNCTION__);
|
Sys_Error("%s: NULL pointer", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
memblock_t *block = (memblock_t *)((char *)ptr - sizeof(memblock_t));
|
memblock_t *block = (memblock_t *)((char *)ptr - sizeof(memblock_t));
|
||||||
|
|
||||||
if (block->id != ZONEID)
|
if (block->id != ZONEID)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: freed a pointer without ZONEID", __FUNCTION__);
|
Sys_Error("%s: freed a pointer without ZONEID", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!block->tag)
|
if (!block->tag)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: freed a freed pointer", __FUNCTION__);
|
Sys_Error("%s: freed a freed pointer", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
block->tag = 0;
|
block->tag = 0;
|
||||||
@ -154,7 +154,7 @@ void *Z_Malloc(int size)
|
|||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: failed on allocation of %i bytes", __FUNCTION__, size);
|
Sys_Error("%s: failed on allocation of %i bytes", __func__, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_memset(buf, 0, size);
|
Q_memset(buf, 0, size);
|
||||||
@ -168,7 +168,7 @@ void *Z_TagMalloc(int size, int tag)
|
|||||||
|
|
||||||
if (tag == 0)
|
if (tag == 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: tried to use a 0 tag", __FUNCTION__);
|
Sys_Error("%s: tried to use a 0 tag", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
size += sizeof(memblock_t);
|
size += sizeof(memblock_t);
|
||||||
@ -266,17 +266,17 @@ void Z_CheckHeap(void)
|
|||||||
|
|
||||||
if ((byte *)block + block->size != (byte *)block->next)
|
if ((byte *)block + block->size != (byte *)block->next)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: block size does not touch the next block\n", __FUNCTION__);
|
Sys_Error("%s: block size does not touch the next block\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block->next->prev != block)
|
if (block->next->prev != block)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: next block doesn't have proper back link\n", __FUNCTION__);
|
Sys_Error("%s: next block doesn't have proper back link\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!block->tag && !block->next->tag)
|
if (!block->tag && !block->next->tag)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: two consecutive free blocks\n", __FUNCTION__);
|
Sys_Error("%s: two consecutive free blocks\n", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,12 +320,12 @@ void Hunk_Check(void)
|
|||||||
{
|
{
|
||||||
if (h->sentinel != HUNK_SENTINEL)
|
if (h->sentinel != HUNK_SENTINEL)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: trahsed sentinel", __FUNCTION__);
|
Sys_Error("%s: trahsed sentinel", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad size", __FUNCTION__);
|
Sys_Error("%s: bad size", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -384,9 +384,9 @@ NOXREF void Hunk_Print(qboolean all)
|
|||||||
// run consistancy checks
|
// run consistancy checks
|
||||||
//
|
//
|
||||||
if (h->sentinel != HUNK_SENTINEL)
|
if (h->sentinel != HUNK_SENTINEL)
|
||||||
Sys_Error("%s: trahsed sentinal", __FUNCTION__);
|
Sys_Error("%s: trahsed sentinal", __func__);
|
||||||
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
if (h->size < 16 || h->size + (byte *)h - hunk_base > hunk_size)
|
||||||
Sys_Error("%s: bad size", __FUNCTION__);
|
Sys_Error("%s: bad size", __func__);
|
||||||
|
|
||||||
next = (hunk_t *)((byte *)h + h->size);
|
next = (hunk_t *)((byte *)h + h->size);
|
||||||
count++;
|
count++;
|
||||||
@ -429,14 +429,14 @@ void *Hunk_AllocName(int size, const char *name)
|
|||||||
{
|
{
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad size: %i", __FUNCTION__, size);
|
Sys_Error("%s: bad size: %i", __func__, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int totalsize = ((size + 15) & ~15) + sizeof(hunk_t);
|
int totalsize = ((size + 15) & ~15) + sizeof(hunk_t);
|
||||||
|
|
||||||
if (hunk_size - hunk_high_used - hunk_low_used < totalsize)
|
if (hunk_size - hunk_high_used - hunk_low_used < totalsize)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: failed on %i bytes", __FUNCTION__, totalsize);
|
Sys_Error("%s: failed on %i bytes", __func__, totalsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
hunk_t *h = (hunk_t *)(hunk_base + hunk_low_used);
|
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)
|
if (mark < 0 || mark > hunk_low_used)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad mark %i", __FUNCTION__, mark);
|
Sys_Error("%s: bad mark %i", __func__, mark);
|
||||||
}
|
}
|
||||||
|
|
||||||
hunk_low_used = mark;
|
hunk_low_used = mark;
|
||||||
@ -494,7 +494,7 @@ void Hunk_FreeToHighMark(int mark)
|
|||||||
|
|
||||||
if (mark < 0 || mark > hunk_high_used)
|
if (mark < 0 || mark > hunk_high_used)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad mark %i", __FUNCTION__, mark);
|
Sys_Error("%s: bad mark %i", __func__, mark);
|
||||||
}
|
}
|
||||||
|
|
||||||
hunk_high_used = mark;
|
hunk_high_used = mark;
|
||||||
@ -511,7 +511,7 @@ void *Hunk_HighAllocName(int size, const char *name)
|
|||||||
hunk_t *h;
|
hunk_t *h;
|
||||||
if (size < 0)
|
if (size < 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: bad size: %i", __FUNCTION__, size);
|
Sys_Error("%s: bad size: %i", __func__, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hunk_tempactive)
|
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)
|
if (hunk_size - hunk_high_used - hunk_low_used < size)
|
||||||
{
|
{
|
||||||
Con_Printf("%s: failed on %i bytes\n", __FUNCTION__, size);
|
Con_Printf("%s: failed on %i bytes\n", __func__, size);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ void Cache_UnlinkLRU(cache_system_t *cs)
|
|||||||
{
|
{
|
||||||
if (!cs->lru_next || !cs->lru_prev)
|
if (!cs->lru_next || !cs->lru_prev)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: NULL link", __FUNCTION__);
|
Sys_Error("%s: NULL link", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
cs->lru_next->lru_prev = cs->lru_prev;
|
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)
|
if (cs->lru_next || cs->lru_prev)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: active link", __FUNCTION__);
|
Sys_Error("%s: active link", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_head.lru_next->lru_prev = cs;
|
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)
|
if (hunk_size - hunk_low_used - hunk_high_used < size)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: %i is greater then free hunk", __FUNCTION__, size);
|
Sys_Error("%s: %i is greater then free hunk", __func__, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
newmem = (cache_system_t *)(hunk_base + hunk_low_used);
|
newmem = (cache_system_t *)(hunk_base + hunk_low_used);
|
||||||
@ -955,7 +955,7 @@ void Cache_Free(cache_user_t *c)
|
|||||||
{
|
{
|
||||||
if (!c->data)
|
if (!c->data)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: not allocated", __FUNCTION__);
|
Sys_Error("%s: not allocated", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_system_t *cs = ((cache_system_t *)c->data - 1);
|
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)
|
if (c->data)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: already allocated", __FUNCTION__);
|
Sys_Error("%s: already allocated", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size <= 0)
|
if (size <= 0)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: size %i", __FUNCTION__, size);
|
Sys_Error("%s: size %i", __func__, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
@ -1036,7 +1036,7 @@ void *Cache_Alloc(cache_user_t *c, int size, char *name)
|
|||||||
|
|
||||||
if (cache_head.lru_prev == &cache_head)
|
if (cache_head.lru_prev == &cache_head)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: out of memory", __FUNCTION__);
|
Sys_Error("%s: out of memory", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache_Free(cache_head.lru_prev->user);
|
Cache_Free(cache_head.lru_prev->user);
|
||||||
@ -1072,7 +1072,7 @@ void Memory_Init(void *buf, int size)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Sys_Error("%s: you must specify a size in KB after -zone", __FUNCTION__);
|
Sys_Error("%s: you must specify a size in KB after -zone", __func__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ void *GetOriginalFuncAddrOrDie(const char *funcName)
|
|||||||
return (void*) cfh->originalAddress;
|
return (void*) cfh->originalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
rehlds_syserror("%s: Could not find function '%s'", __FUNCTION__, funcName);
|
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ void *GetFuncRefAddrOrDie(const char *funcName)
|
|||||||
return (void*)cfh->originalAddress;
|
return (void*)cfh->originalAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
rehlds_syserror("%s: Could not find function '%s'", __FUNCTION__, funcName);
|
rehlds_syserror("%s: Could not find function '%s'", __func__, funcName);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ int HookEngine(size_t addr)
|
|||||||
if (!GetAddress(&g_EngineModule, (Address*)refData, g_BaseOffset))
|
if (!GetAddress(&g_EngineModule, (Address*)refData, g_BaseOffset))
|
||||||
{
|
{
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
printf("%s: symbol not found \"%s\", symbol index: %i\n", __FUNCTION__, refData->symbolName, refData->symbolIndex);
|
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
|
||||||
success = false;
|
success = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ int HookEngine(size_t addr)
|
|||||||
if (!GetAddress(&g_EngineModule, (Address*)refFunc, g_BaseOffset))
|
if (!GetAddress(&g_EngineModule, (Address*)refFunc, g_BaseOffset))
|
||||||
{
|
{
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
printf("%s: symbol not found \"%s\", symbol index: %i\n", __FUNCTION__, refData->symbolName, refData->symbolIndex);
|
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
|
||||||
success = false;
|
success = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ int HookEngine(size_t addr)
|
|||||||
if (!GetAddress(&g_EngineModule, (Address*)hookFunc, g_BaseOffset))
|
if (!GetAddress(&g_EngineModule, (Address*)hookFunc, g_BaseOffset))
|
||||||
{
|
{
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
printf("%s: symbol not found \"%s\", symbol index: %i\n", __FUNCTION__, refData->symbolName, refData->symbolIndex);
|
printf("%s: symbol not found \"%s\", symbol index: %i\n", __func__, refData->symbolName, refData->symbolIndex);
|
||||||
success = false;
|
success = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ int HookEngine(size_t addr)
|
|||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
printf("%s: failed to hook engine!\n", __FUNCTION__);
|
printf("%s: failed to hook engine!\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
@ -420,13 +420,13 @@ void ProcessModuleData(Module *module)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base;
|
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)module->base;
|
||||||
if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
|
if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE) {
|
||||||
rehlds_syserror("%s: Invalid DOS header signature", __FUNCTION__);
|
rehlds_syserror("%s: Invalid DOS header signature", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew);
|
PIMAGE_NT_HEADERS NTHeaders = (PIMAGE_NT_HEADERS)((size_t)module->base + dosHeader->e_lfanew);
|
||||||
if (NTHeaders->Signature != 0x4550) {
|
if (NTHeaders->Signature != 0x4550) {
|
||||||
rehlds_syserror("%s: Invalid NT header signature", __FUNCTION__);
|
rehlds_syserror("%s: Invalid NT header signature", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ void ProcessModuleData(Module *module)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CodeSection == NULL) {
|
if (CodeSection == NULL) {
|
||||||
rehlds_syserror("%s: Code section not found", __FUNCTION__);
|
rehlds_syserror("%s: Code section not found", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,9 +79,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
// Deail with stupid macro in kernel.h
|
|
||||||
#undef __FUNCTION__
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -129,11 +126,6 @@
|
|||||||
VirtualFree(ptr, 0, MEM_RELEASE);
|
VirtualFree(ptr, 0, MEM_RELEASE);
|
||||||
}
|
}
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#ifdef __FUNCTION__
|
|
||||||
#undef __FUNCTION__
|
|
||||||
#endif
|
|
||||||
#define __FUNCTION__ __func__
|
|
||||||
|
|
||||||
#ifndef PAGESIZE
|
#ifndef PAGESIZE
|
||||||
#define PAGESIZE 4096
|
#define PAGESIZE 4096
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@ private:
|
|||||||
// this was a root node
|
// this was a root node
|
||||||
unsigned int rootId = GetRoodNodeId(node->key);
|
unsigned int rootId = GetRoodNodeId(node->key);
|
||||||
if (m_RootNodes[rootId] != node) {
|
if (m_RootNodes[rootId] != node) {
|
||||||
Sys_Error("%s: invalid root node", __FUNCTION__);
|
Sys_Error("%s: invalid root node", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
|||||||
m_DataRegion = (uint8*) sys_allocmem(DATA_REGION_SIZE);
|
m_DataRegion = (uint8*) sys_allocmem(DATA_REGION_SIZE);
|
||||||
|
|
||||||
if (!m_MetaRegion || !m_DataRegion) {
|
if (!m_MetaRegion || !m_DataRegion) {
|
||||||
Sys_Error("%s: direct allocation failed", __FUNCTION__);
|
Sys_Error("%s: direct allocation failed", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
//initialize meta region header
|
//initialize meta region header
|
||||||
@ -36,7 +36,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
|||||||
metaPos += sizeof(recorder_state);
|
metaPos += sizeof(recorder_state);
|
||||||
|
|
||||||
if ((metaPos - (char*)m_MetaRegion) > META_REGION_HEADER) {
|
if ((metaPos - (char*)m_MetaRegion) > META_REGION_HEADER) {
|
||||||
Sys_Error("%s: Meta header overflow", __FUNCTION__);
|
Sys_Error("%s: Meta header overflow", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
//initialize data region header
|
//initialize data region header
|
||||||
@ -48,7 +48,7 @@ CRehldsFlightRecorder::CRehldsFlightRecorder() {
|
|||||||
dataPos += sizeof(data_header);
|
dataPos += sizeof(data_header);
|
||||||
|
|
||||||
if ((dataPos - (char*)m_pDataHeader) > DATA_REGION_HEADER) {
|
if ((dataPos - (char*)m_pDataHeader) > DATA_REGION_HEADER) {
|
||||||
Sys_Error("%s: Data header overflow", __FUNCTION__);
|
Sys_Error("%s: Data header overflow", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
InitHeadersContent();
|
InitHeadersContent();
|
||||||
@ -93,7 +93,7 @@ void CRehldsFlightRecorder::MoveToStart() {
|
|||||||
|
|
||||||
void CRehldsFlightRecorder::StartMessage(uint16 msg, bool entrance) {
|
void CRehldsFlightRecorder::StartMessage(uint16 msg, bool entrance) {
|
||||||
if (msg == 0 || msg > m_pMetaHeader->numMessages) {
|
if (msg == 0 || msg > m_pMetaHeader->numMessages) {
|
||||||
Sys_Error("%s: Invalid message id %u", __FUNCTION__, msg);
|
Sys_Error("%s: Invalid message id %u", __func__, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entrance) {
|
if (entrance) {
|
||||||
@ -101,7 +101,7 @@ void CRehldsFlightRecorder::StartMessage(uint16 msg, bool entrance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_pRecorderState->curMessage != 0) {
|
if (m_pRecorderState->curMessage != 0) {
|
||||||
Sys_Error("%s: overlapping messages", __FUNCTION__);
|
Sys_Error("%s: overlapping messages", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int sz = DATA_REGION_MAIN_SIZE - m_pRecorderState->wpos;
|
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) {
|
if (m_pRecorderState->curMessage != msg) {
|
||||||
Sys_Error("%s: invalid message %u", __FUNCTION__, msg);
|
Sys_Error("%s: invalid message %u", __func__, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int freeSz = DATA_REGION_MAIN_SIZE - m_pRecorderState->wpos;
|
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;
|
unsigned int msgSize = m_pRecorderState->wpos - m_pRecorderState->lastMsgBeginPos;
|
||||||
if (msgSize > MSG_MAX_SIZE) {
|
if (msgSize > MSG_MAX_SIZE) {
|
||||||
Sys_Error("%s: too big message %u; size %u", __FUNCTION__, msg, msgSize);
|
Sys_Error("%s: too big message %u; size %u", __func__, msg, msgSize);
|
||||||
}
|
}
|
||||||
*(uint16*)(m_DataRegionPtr + m_pRecorderState->wpos) = msgSize;
|
*(uint16*)(m_DataRegionPtr + m_pRecorderState->wpos) = msgSize;
|
||||||
m_pRecorderState->wpos += 2;
|
m_pRecorderState->wpos += 2;
|
||||||
@ -142,13 +142,13 @@ void CRehldsFlightRecorder::EndMessage(uint16 msg, bool entrance) {
|
|||||||
void CRehldsFlightRecorder::CheckSize(unsigned int wantToWriteLen) {
|
void CRehldsFlightRecorder::CheckSize(unsigned int wantToWriteLen) {
|
||||||
unsigned int msgSize = m_pRecorderState->wpos - m_pRecorderState->lastMsgBeginPos;
|
unsigned int msgSize = m_pRecorderState->wpos - m_pRecorderState->lastMsgBeginPos;
|
||||||
if (msgSize + wantToWriteLen > MSG_MAX_SIZE) {
|
if (msgSize + wantToWriteLen > MSG_MAX_SIZE) {
|
||||||
Sys_Error("%s: too big message %u; size %u", __FUNCTION__, m_pRecorderState->curMessage, msgSize);
|
Sys_Error("%s: too big message %u; size %u", __func__, m_pRecorderState->curMessage, msgSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRehldsFlightRecorder::WriteBuffer(const void* data, unsigned int len) {
|
void CRehldsFlightRecorder::WriteBuffer(const void* data, unsigned int len) {
|
||||||
if (m_pRecorderState->curMessage == 0) {
|
if (m_pRecorderState->curMessage == 0) {
|
||||||
Sys_Error("%s: Could not write, invalid state", __FUNCTION__);
|
Sys_Error("%s: Could not write, invalid state", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckSize(len);
|
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) {
|
uint16 CRehldsFlightRecorder::RegisterMessage(const char* module, const char *message, unsigned int version, bool inOut) {
|
||||||
if (m_pMetaHeader->numMessages >= MSG_MAX_ID) {
|
if (m_pMetaHeader->numMessages >= MSG_MAX_ID) {
|
||||||
Sys_Error("%s: can't register message; limit exceeded", __FUNCTION__);
|
Sys_Error("%s: can't register message; limit exceeded", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 msgId = ++m_pMetaHeader->numMessages;
|
uint16 msgId = ++m_pMetaHeader->numMessages;
|
||||||
|
@ -79,7 +79,7 @@ private:
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
void WritePrimitive(T v) {
|
void WritePrimitive(T v) {
|
||||||
if (m_pRecorderState->curMessage == 0) {
|
if (m_pRecorderState->curMessage == 0) {
|
||||||
Sys_Error("%s: Could not write, invalid state", __FUNCTION__);
|
Sys_Error("%s: Could not write, invalid state", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckSize(sizeof(T));
|
CheckSize(sizeof(T));
|
||||||
|
@ -11,7 +11,7 @@ CRehldsRuntimeConfig::CRehldsRuntimeConfig()
|
|||||||
|
|
||||||
void CRehldsRuntimeConfig::parseFromCommandLine(const char* cmdLine) {
|
void CRehldsRuntimeConfig::parseFromCommandLine(const char* cmdLine) {
|
||||||
char localBuf[2048];
|
char localBuf[2048];
|
||||||
if (strlen(cmdLine) >= sizeof(localBuf)) rehlds_syserror("%s: too long cmdline", __FUNCTION__);
|
if (strlen(cmdLine) >= sizeof(localBuf)) rehlds_syserror("%s: too long cmdline", __func__);
|
||||||
|
|
||||||
strcpy(localBuf, cmdLine);
|
strcpy(localBuf, cmdLine);
|
||||||
char* cpos = localBuf;
|
char* cpos = localBuf;
|
||||||
@ -23,7 +23,7 @@ void CRehldsRuntimeConfig::parseFromCommandLine(const char* cmdLine) {
|
|||||||
if (!strcmp(token, "--rehlds-test-record"))
|
if (!strcmp(token, "--rehlds-test-record"))
|
||||||
{
|
{
|
||||||
const char* fname = getNextToken(&cpos);
|
const char* fname = getNextToken(&cpos);
|
||||||
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-record <filename>", __FUNCTION__);
|
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-record <filename>", __func__);
|
||||||
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
||||||
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
||||||
testPlayerMode = TPM_RECORD;
|
testPlayerMode = TPM_RECORD;
|
||||||
@ -31,7 +31,7 @@ void CRehldsRuntimeConfig::parseFromCommandLine(const char* cmdLine) {
|
|||||||
else if (!strcmp(token, "--rehlds-test-play"))
|
else if (!strcmp(token, "--rehlds-test-play"))
|
||||||
{
|
{
|
||||||
const char* fname = getNextToken(&cpos);
|
const char* fname = getNextToken(&cpos);
|
||||||
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-play <filename>", __FUNCTION__);
|
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-play <filename>", __func__);
|
||||||
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
||||||
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
||||||
testPlayerMode = TPM_PLAY;
|
testPlayerMode = TPM_PLAY;
|
||||||
@ -39,7 +39,7 @@ void CRehldsRuntimeConfig::parseFromCommandLine(const char* cmdLine) {
|
|||||||
else if (!strcmp(token, "--rehlds-test-anon"))
|
else if (!strcmp(token, "--rehlds-test-anon"))
|
||||||
{
|
{
|
||||||
const char* fname = getNextToken(&cpos);
|
const char* fname = getNextToken(&cpos);
|
||||||
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-anon <filename>", __FUNCTION__);
|
if (fname == NULL) rehlds_syserror("%s: usage: --rehlds-test-anon <filename>", __func__);
|
||||||
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
strncpy(testRecordingFileName, fname, sizeof(testRecordingFileName));
|
||||||
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
testRecordingFileName[sizeof(testRecordingFileName) - 1] = 0;
|
||||||
testPlayerMode = TPM_ANONYMIZE;
|
testPlayerMode = TPM_ANONYMIZE;
|
||||||
|
@ -40,11 +40,11 @@ bool AbstractHookChainRegistry::findHook(void* hookFunc) const
|
|||||||
void AbstractHookChainRegistry::addHook(void* hookFunc, int priority)
|
void AbstractHookChainRegistry::addHook(void* hookFunc, int priority)
|
||||||
{
|
{
|
||||||
if (!hookFunc) {
|
if (!hookFunc) {
|
||||||
Sys_Error("%s: Parameter hookFunc can't be a nullptr", __FUNCTION__);
|
Sys_Error("%s: Parameter hookFunc can't be a nullptr", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (findHook(hookFunc)) {
|
if (findHook(hookFunc)) {
|
||||||
Sys_Error("%s: The same handler can't be used twice on the hookchain.", __FUNCTION__);
|
Sys_Error("%s: The same handler can't be used twice on the hookchain.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto i = 0; i < MAX_HOOKS_IN_CHAIN; i++)
|
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) {
|
if (m_NumHooks >= MAX_HOOKS_IN_CHAIN) {
|
||||||
Sys_Error("%s: MAX_HOOKS_IN_CHAIN limit hit", __FUNCTION__);
|
Sys_Error("%s: MAX_HOOKS_IN_CHAIN limit hit", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_NumHooks++;
|
m_NumHooks++;
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
IHookChainImpl(void** hooks, origfunc_t orig) : m_Hooks(hooks), m_OriginalFunc(orig)
|
IHookChainImpl(void** hooks, origfunc_t orig) : m_Hooks(hooks), m_OriginalFunc(orig)
|
||||||
{
|
{
|
||||||
if (orig == NULL)
|
if (orig == NULL)
|
||||||
Sys_Error("%s: Non-void HookChain without original function.", __FUNCTION__);
|
Sys_Error("%s: Non-void HookChain without original function.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~IHookChainImpl() {}
|
virtual ~IHookChainImpl() {}
|
||||||
|
@ -19,7 +19,7 @@ CSimplePlatform::CSimplePlatform() {
|
|||||||
wsock = LoadLibraryA("wsock32.dll");
|
wsock = LoadLibraryA("wsock32.dll");
|
||||||
setsockopt_v11 = (setsockopt_proto)GetProcAddress(wsock, "setsockopt");
|
setsockopt_v11 = (setsockopt_proto)GetProcAddress(wsock, "setsockopt");
|
||||||
if (setsockopt_v11 == NULL)
|
if (setsockopt_v11 == NULL)
|
||||||
rehlds_syserror("%s: setsockopt_v11 not found", __FUNCTION__);
|
rehlds_syserror("%s: setsockopt_v11 not found", __func__);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ bool EXT_FUNC CRehldsServerStatic::IsLogActive()
|
|||||||
IGameClient* EXT_FUNC CRehldsServerStatic::GetClient(int id)
|
IGameClient* EXT_FUNC CRehldsServerStatic::GetClient(int id)
|
||||||
{
|
{
|
||||||
if (id < 0 || id >= g_psvs.maxclients)
|
if (id < 0 || id >= g_psvs.maxclients)
|
||||||
Sys_Error("%s: invalid id provided: %d", __FUNCTION__, id);
|
Sys_Error("%s: invalid id provided: %d", __func__, id);
|
||||||
|
|
||||||
return g_GameClients[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)
|
client_t* EXT_FUNC CRehldsServerStatic::GetClient_t(int id)
|
||||||
{
|
{
|
||||||
if (id < 0 || id >= g_psvs.maxclients)
|
if (id < 0 || id >= g_psvs.maxclients)
|
||||||
Sys_Error("%s: invalid id provided: %d", __FUNCTION__, id);
|
Sys_Error("%s: invalid id provided: %d", __func__, id);
|
||||||
|
|
||||||
return &g_psvs.clients[id];
|
return &g_psvs.clients[id];
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ IGameClient* GetRehldsApiClient(client_t* cl)
|
|||||||
int idx = cl - g_psvs.clients;
|
int idx = cl - g_psvs.clients;
|
||||||
if (idx < 0 || idx >= g_psvs.maxclients)
|
if (idx < 0 || idx >= g_psvs.maxclients)
|
||||||
{
|
{
|
||||||
Sys_Error("%s: Invalid client index %d", __FUNCTION__, idx);
|
Sys_Error("%s: Invalid client index %d", __func__, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_GameClients[idx];
|
return g_GameClients[idx];
|
||||||
|
@ -16,7 +16,7 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) {
|
|||||||
{
|
{
|
||||||
static GSClientApprove_t cbdata;
|
static GSClientApprove_t cbdata;
|
||||||
cbdata = *(GSClientApprove_t*)data;
|
cbdata = *(GSClientApprove_t*)data;
|
||||||
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __FUNCTION__);
|
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __func__);
|
||||||
return &cbdata;
|
return &cbdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) {
|
|||||||
{
|
{
|
||||||
static GSClientDeny_t cbdata;
|
static GSClientDeny_t cbdata;
|
||||||
cbdata = *(GSClientDeny_t*)data;
|
cbdata = *(GSClientDeny_t*)data;
|
||||||
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __FUNCTION__);
|
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __func__);
|
||||||
return &cbdata;
|
return &cbdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) {
|
|||||||
{
|
{
|
||||||
static GSClientKick_t cbdata;
|
static GSClientKick_t cbdata;
|
||||||
cbdata = *(GSClientKick_t*)data;
|
cbdata = *(GSClientKick_t*)data;
|
||||||
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __FUNCTION__);
|
cbdata.m_SteamID = m_Anonymizer->Real2FakeSteamId(cbdata.m_SteamID, __func__);
|
||||||
return &cbdata;
|
return &cbdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,22 +42,22 @@ void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data) {
|
|||||||
return data;
|
return data;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
rehlds_syserror("%s: unsupported callback %u", __FUNCTION__, m_iCallback);
|
rehlds_syserror("%s: unsupported callback %u", __func__, m_iCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
|
void* CSteamCallbackAnonymizingWrapper::Anonymize(void* data, bool bIOFailure, SteamAPICall_t hSteamAPICall) {
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CSteamCallbackAnonymizingWrapper::Run(void *pvParam)
|
void CSteamCallbackAnonymizingWrapper::Run(void *pvParam)
|
||||||
{
|
{
|
||||||
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __FUNCTION__);
|
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __func__);
|
||||||
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
m_Wrapped->Run(Anonymize(pvParam));
|
m_Wrapped->Run(Anonymize(pvParam));
|
||||||
this->SetFlags(m_Wrapped->GetFlags());
|
this->SetFlags(m_Wrapped->GetFlags());
|
||||||
@ -66,8 +66,8 @@ void CSteamCallbackAnonymizingWrapper::Run(void *pvParam)
|
|||||||
|
|
||||||
void CSteamCallbackAnonymizingWrapper::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall)
|
void CSteamCallbackAnonymizingWrapper::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall)
|
||||||
{
|
{
|
||||||
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __FUNCTION__);
|
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __func__);
|
||||||
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
m_Wrapped->Run(Anonymize(pvParam, bIOFailure, hSteamAPICall), bIOFailure, hSteamAPICall);
|
m_Wrapped->Run(Anonymize(pvParam, bIOFailure, hSteamAPICall), bIOFailure, hSteamAPICall);
|
||||||
this->SetFlags(m_Wrapped->GetFlags());
|
this->SetFlags(m_Wrapped->GetFlags());
|
||||||
@ -91,25 +91,25 @@ CSteamAppsAnonymizingWrapper::CSteamAppsAnonymizingWrapper(ISteamApps* original,
|
|||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsSubscribed()
|
bool CSteamAppsAnonymizingWrapper::BIsSubscribed()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsLowViolence()
|
bool CSteamAppsAnonymizingWrapper::BIsLowViolence()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsCybercafe()
|
bool CSteamAppsAnonymizingWrapper::BIsCybercafe()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsVACBanned()
|
bool CSteamAppsAnonymizingWrapper::BIsVACBanned()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,82 +121,82 @@ const char* CSteamAppsAnonymizingWrapper::GetCurrentGameLanguage()
|
|||||||
|
|
||||||
const char* CSteamAppsAnonymizingWrapper::GetAvailableGameLanguages()
|
const char* CSteamAppsAnonymizingWrapper::GetAvailableGameLanguages()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsSubscribedApp(AppId_t appID)
|
bool CSteamAppsAnonymizingWrapper::BIsSubscribedApp(AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsDlcInstalled(AppId_t appID)
|
bool CSteamAppsAnonymizingWrapper::BIsDlcInstalled(AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsAnonymizingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID)
|
uint32 CSteamAppsAnonymizingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BIsSubscribedFromFreeWeekend()
|
bool CSteamAppsAnonymizingWrapper::BIsSubscribedFromFreeWeekend()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSteamAppsAnonymizingWrapper::GetDLCCount()
|
int CSteamAppsAnonymizingWrapper::GetDLCCount()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
|
bool CSteamAppsAnonymizingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsAnonymizingWrapper::InstallDLC(AppId_t nAppID)
|
void CSteamAppsAnonymizingWrapper::InstallDLC(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsAnonymizingWrapper::UninstallDLC(AppId_t nAppID)
|
void CSteamAppsAnonymizingWrapper::UninstallDLC(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsAnonymizingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID)
|
void CSteamAppsAnonymizingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize)
|
bool CSteamAppsAnonymizingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsAnonymizingWrapper::MarkContentCorrupt(bool bMissingFilesOnly)
|
bool CSteamAppsAnonymizingWrapper::MarkContentCorrupt(bool bMissingFilesOnly)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsAnonymizingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots)
|
uint32 CSteamAppsAnonymizingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsAnonymizingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize)
|
uint32 CSteamAppsAnonymizingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ CSteamGameServerAnonymizingWrapper::CSteamGameServerAnonymizingWrapper(ISteamGam
|
|||||||
|
|
||||||
bool CSteamGameServerAnonymizingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString)
|
bool CSteamGameServerAnonymizingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ void CSteamGameServerAnonymizingWrapper::SetDedicatedServer(bool bDedicated)
|
|||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::LogOn(const char *pszAccountName, const char *pszPassword)
|
void CSteamGameServerAnonymizingWrapper::LogOn(const char *pszAccountName, const char *pszPassword)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::LogOnAnonymous()
|
void CSteamGameServerAnonymizingWrapper::LogOnAnonymous()
|
||||||
@ -303,12 +303,12 @@ void CSteamGameServerAnonymizingWrapper::SetPasswordProtected(bool bPasswordProt
|
|||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SetSpectatorPort(uint16 unSpectatorPort)
|
void CSteamGameServerAnonymizingWrapper::SetSpectatorPort(uint16 unSpectatorPort)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SetSpectatorServerName(const char *pszSpectatorServerName)
|
void CSteamGameServerAnonymizingWrapper::SetSpectatorServerName(const char *pszSpectatorServerName)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::ClearAllKeyValues()
|
void CSteamGameServerAnonymizingWrapper::ClearAllKeyValues()
|
||||||
@ -323,25 +323,25 @@ void CSteamGameServerAnonymizingWrapper::SetKeyValue(const char *pKey, const cha
|
|||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SetGameTags(const char *pchGameTags)
|
void CSteamGameServerAnonymizingWrapper::SetGameTags(const char *pchGameTags)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SetGameData(const char *pchGameData)
|
void CSteamGameServerAnonymizingWrapper::SetGameData(const char *pchGameData)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SetRegion(const char *pszRegion)
|
void CSteamGameServerAnonymizingWrapper::SetRegion(const char *pszRegion)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerAnonymizingWrapper::SendUserConnectAndAuthenticate(uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser)
|
bool CSteamGameServerAnonymizingWrapper::SendUserConnectAndAuthenticate(uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser)
|
||||||
{
|
{
|
||||||
uint32 realIp = m_Anonymizer->Fake2RealIp(ntohl(unIPClient), __FUNCTION__);
|
uint32 realIp = m_Anonymizer->Fake2RealIp(ntohl(unIPClient), __func__);
|
||||||
bool res = m_Wrapped->SendUserConnectAndAuthenticate(htonl(realIp), pvAuthBlob, cubAuthBlobSize, pSteamIDUser);
|
bool res = m_Wrapped->SendUserConnectAndAuthenticate(htonl(realIp), pvAuthBlob, cubAuthBlobSize, pSteamIDUser);
|
||||||
if (res) {
|
if (res) {
|
||||||
*pSteamIDUser = m_Anonymizer->Real2FakeSteamId(*pSteamIDUser, __FUNCTION__);
|
*pSteamIDUser = m_Anonymizer->Real2FakeSteamId(*pSteamIDUser, __func__);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -354,14 +354,14 @@ CSteamID CSteamGameServerAnonymizingWrapper::CreateUnauthenticatedUserConnection
|
|||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::SendUserDisconnect(CSteamID steamIDUser)
|
void CSteamGameServerAnonymizingWrapper::SendUserDisconnect(CSteamID steamIDUser)
|
||||||
{
|
{
|
||||||
CSteamID real = m_Anonymizer->Fake2RealSteamId(steamIDUser, __FUNCTION__);
|
CSteamID real = m_Anonymizer->Fake2RealSteamId(steamIDUser, __func__);
|
||||||
m_Wrapped->SendUserDisconnect(real);
|
m_Wrapped->SendUserDisconnect(real);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerAnonymizingWrapper::BUpdateUserData(CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore)
|
bool CSteamGameServerAnonymizingWrapper::BUpdateUserData(CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore)
|
||||||
{
|
{
|
||||||
CSteamID real = steamIDUser.BAnonAccount() ? steamIDUser : m_Anonymizer->Fake2RealSteamId(steamIDUser, __FUNCTION__);
|
CSteamID real = steamIDUser.BAnonAccount() ? steamIDUser : m_Anonymizer->Fake2RealSteamId(steamIDUser, __func__);
|
||||||
std::string realName = m_Anonymizer->Fake2RealName(pchPlayerName, __FUNCTION__);
|
std::string realName = m_Anonymizer->Fake2RealName(pchPlayerName, __func__);
|
||||||
|
|
||||||
bool res = m_Wrapped->BUpdateUserData(real, realName.c_str(), uScore);
|
bool res = m_Wrapped->BUpdateUserData(real, realName.c_str(), uScore);
|
||||||
return res;
|
return res;
|
||||||
@ -369,58 +369,58 @@ bool CSteamGameServerAnonymizingWrapper::BUpdateUserData(CSteamID steamIDUser, c
|
|||||||
|
|
||||||
HAuthTicket CSteamGameServerAnonymizingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket)
|
HAuthTicket CSteamGameServerAnonymizingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_HAuthTicketInvalid;
|
return k_HAuthTicketInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
EBeginAuthSessionResult CSteamGameServerAnonymizingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID)
|
EBeginAuthSessionResult CSteamGameServerAnonymizingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_EBeginAuthSessionResultInvalidTicket;
|
return k_EBeginAuthSessionResultInvalidTicket;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::EndAuthSession(CSteamID steamID)
|
void CSteamGameServerAnonymizingWrapper::EndAuthSession(CSteamID steamID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket)
|
void CSteamGameServerAnonymizingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
EUserHasLicenseForAppResult CSteamGameServerAnonymizingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
|
EUserHasLicenseForAppResult CSteamGameServerAnonymizingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_EUserHasLicenseResultDoesNotHaveLicense;
|
return k_EUserHasLicenseResultDoesNotHaveLicense;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerAnonymizingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
|
bool CSteamGameServerAnonymizingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::GetGameplayStats()
|
void CSteamGameServerAnonymizingWrapper::GetGameplayStats()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerAnonymizingWrapper::GetServerReputation()
|
SteamAPICall_t CSteamGameServerAnonymizingWrapper::GetServerReputation()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamGameServerAnonymizingWrapper::GetPublicIP()
|
uint32 CSteamGameServerAnonymizingWrapper::GetPublicIP()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort)
|
bool CSteamGameServerAnonymizingWrapper::HandleIncomingPacket(const void *pData, int cbData, uint32 srcIP, uint16 srcPort)
|
||||||
{
|
{
|
||||||
uint32 realIp = m_Anonymizer->Fake2RealIp(htonl(srcIP), __FUNCTION__);
|
uint32 realIp = m_Anonymizer->Fake2RealIp(htonl(srcIP), __func__);
|
||||||
|
|
||||||
bool res;
|
bool res;
|
||||||
if (m_Anonymizer->m_OriginalConnectPacketLen) {
|
if (m_Anonymizer->m_OriginalConnectPacketLen) {
|
||||||
@ -438,7 +438,7 @@ int CSteamGameServerAnonymizingWrapper::GetNextOutgoingPacket(void *pOut, int cb
|
|||||||
{
|
{
|
||||||
int res = m_Wrapped->GetNextOutgoingPacket(pOut, cbMaxOut, pNetAdr, pPort);
|
int res = m_Wrapped->GetNextOutgoingPacket(pOut, cbMaxOut, pNetAdr, pPort);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
uint32 fakeIp = m_Anonymizer->Real2FakeIp(ntohl(*pNetAdr), __FUNCTION__);
|
uint32 fakeIp = m_Anonymizer->Real2FakeIp(ntohl(*pNetAdr), __func__);
|
||||||
*pNetAdr = htonl(fakeIp);
|
*pNetAdr = htonl(fakeIp);
|
||||||
|
|
||||||
//Clear players list
|
//Clear players list
|
||||||
@ -466,18 +466,18 @@ void CSteamGameServerAnonymizingWrapper::SetHeartbeatInterval(int iHeartbeatInte
|
|||||||
|
|
||||||
void CSteamGameServerAnonymizingWrapper::ForceHeartbeat()
|
void CSteamGameServerAnonymizingWrapper::ForceHeartbeat()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerAnonymizingWrapper::AssociateWithClan(CSteamID steamIDClan)
|
SteamAPICall_t CSteamGameServerAnonymizingWrapper::AssociateWithClan(CSteamID steamIDClan)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerAnonymizingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
|
SteamAPICall_t CSteamGameServerAnonymizingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ int CAnonymizingEngExtInterceptor::recvfrom(SOCKET s, char* buf, int len, int fl
|
|||||||
{
|
{
|
||||||
int res = m_BasePlatform->recvfrom(s, buf, len, flags, from, fromlen);
|
int res = m_BasePlatform->recvfrom(s, buf, len, flags, from, fromlen);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
Real2FakeSockaddr(from, __FUNCTION__);
|
Real2FakeSockaddr(from, __func__);
|
||||||
if (res > 4 && (*(uint32*)buf) == 0xFFFFFFFF) {
|
if (res > 4 && (*(uint32*)buf) == 0xFFFFFFFF) {
|
||||||
unsigned int localLen = res;
|
unsigned int localLen = res;
|
||||||
ProcessConnectionlessPacket((uint8*)buf, &localLen);
|
ProcessConnectionlessPacket((uint8*)buf, &localLen);
|
||||||
@ -613,7 +613,7 @@ int CAnonymizingEngExtInterceptor::sendto(SOCKET s, const char* buf, int len, in
|
|||||||
|
|
||||||
sockaddr saddr;
|
sockaddr saddr;
|
||||||
memcpy(&saddr, to, sizeof(sockaddr_in));
|
memcpy(&saddr, to, sizeof(sockaddr_in));
|
||||||
Fake2RealSockaddr(&saddr, __FUNCTION__);
|
Fake2RealSockaddr(&saddr, __func__);
|
||||||
|
|
||||||
int res = m_BasePlatform->sendto(s, buf, len, flags, &saddr, tolen);
|
int res = m_BasePlatform->sendto(s, buf, len, flags, &saddr, tolen);
|
||||||
return res;
|
return res;
|
||||||
@ -639,7 +639,7 @@ int CAnonymizingEngExtInterceptor::WSAGetLastError()
|
|||||||
|
|
||||||
struct hostent* CAnonymizingEngExtInterceptor::gethostbyname(const char *name)
|
struct hostent* CAnonymizingEngExtInterceptor::gethostbyname(const char *name)
|
||||||
{
|
{
|
||||||
auto s = Fake2RealHost(name, __FUNCTION__);
|
auto s = Fake2RealHost(name, __func__);
|
||||||
struct hostent* res = m_BasePlatform->gethostbyname(s.c_str());
|
struct hostent* res = m_BasePlatform->gethostbyname(s.c_str());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -648,7 +648,7 @@ int CAnonymizingEngExtInterceptor::gethostname(char *name, int namelen)
|
|||||||
{
|
{
|
||||||
int res = m_BasePlatform->gethostname(name, namelen);
|
int res = m_BasePlatform->gethostname(name, namelen);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
auto s = Real2FakeHost(name, __FUNCTION__);
|
auto s = Real2FakeHost(name, __func__);
|
||||||
strncpy(name, s.c_str(), namelen);
|
strncpy(name, s.c_str(), namelen);
|
||||||
name[namelen - 1] = 0;
|
name[namelen - 1] = 0;
|
||||||
}
|
}
|
||||||
@ -675,8 +675,8 @@ void CAnonymizingEngExtInterceptor::SteamAPI_RegisterCallback(CCallbackBase *pCa
|
|||||||
{
|
{
|
||||||
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
//if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
//if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
m_BasePlatform->SteamAPI_RegisterCallback(wrappee, iCallback);
|
m_BasePlatform->SteamAPI_RegisterCallback(wrappee, iCallback);
|
||||||
|
|
||||||
@ -695,8 +695,8 @@ void CAnonymizingEngExtInterceptor::SteamAPI_UnregisterCallResult(class CCallbac
|
|||||||
{
|
{
|
||||||
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
m_BasePlatform->SteamAPI_UnregisterCallResult(wrappee, hAPICall);
|
m_BasePlatform->SteamAPI_UnregisterCallResult(wrappee, hAPICall);
|
||||||
|
|
||||||
@ -768,8 +768,8 @@ void CAnonymizingEngExtInterceptor::SteamAPI_UnregisterCallback(CCallbackBase *p
|
|||||||
{
|
{
|
||||||
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackAnonymizingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
m_BasePlatform->SteamAPI_UnregisterCallback(wrappee);
|
m_BasePlatform->SteamAPI_UnregisterCallback(wrappee);
|
||||||
|
|
||||||
@ -782,11 +782,11 @@ void CAnonymizingEngExtInterceptor::AnonymizeAddr(const char* real, const char*
|
|||||||
netadr_t fakeAdr;
|
netadr_t fakeAdr;
|
||||||
|
|
||||||
if (!NET_StringToAdr(real, &realAdr)) {
|
if (!NET_StringToAdr(real, &realAdr)) {
|
||||||
rehlds_syserror("%s: Invalid address %s", __FUNCTION__, realAdr);
|
rehlds_syserror("%s: Invalid address %s", __func__, realAdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NET_StringToAdr(fake, &fakeAdr)) {
|
if (!NET_StringToAdr(fake, &fakeAdr)) {
|
||||||
rehlds_syserror("%s: Invalid address %s", __FUNCTION__, realAdr);
|
rehlds_syserror("%s: Invalid address %s", __func__, realAdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnonymizeAddr(realAdr, fakeAdr);
|
AnonymizeAddr(realAdr, fakeAdr);
|
||||||
@ -945,7 +945,7 @@ void CAnonymizingEngExtInterceptor::ProcessConnectPacket(uint8* data, unsigned i
|
|||||||
|
|
||||||
bool isSteam = (3 == atoi(Info_ValueForKey(protinfo, "prot")));
|
bool isSteam = (3 == atoi(Info_ValueForKey(protinfo, "prot")));
|
||||||
|
|
||||||
std::string newName = Real2FakeName(Info_ValueForKey(origuserinfo, "name"), __FUNCTION__);
|
std::string newName = Real2FakeName(Info_ValueForKey(origuserinfo, "name"), __func__);
|
||||||
Info_SetValueForKey(origuserinfo, "name", newName.c_str(), MAX_INFO_STRING);
|
Info_SetValueForKey(origuserinfo, "name", newName.c_str(), MAX_INFO_STRING);
|
||||||
|
|
||||||
userinfo[0] = 0;
|
userinfo[0] = 0;
|
||||||
|
@ -66,7 +66,7 @@ bool CompareSockAddrs(void* ps1, void* ps2) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
rehlds_syserror("%s: Unknown sockaddr family %u", __FUNCTION__, sa1->sa_family);
|
rehlds_syserror("%s: Unknown sockaddr family %u", __func__, sa1->sa_family);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0 == memcmp(ps1, ps2, compareSize);
|
return 0 == memcmp(ps1, ps2, compareSize);
|
||||||
@ -599,10 +599,10 @@ bool CRecvFromCall::compareInputArgs(IEngExtCall* other, bool strict)
|
|||||||
void CRecvFromCall::setResult(const void* data, const void* from, int fromLen, int res)
|
void CRecvFromCall::setResult(const void* data, const void* from, int fromLen, int res)
|
||||||
{
|
{
|
||||||
if (res > 0 && res > sizeof(m_Data))
|
if (res > 0 && res > sizeof(m_Data))
|
||||||
rehlds_syserror("%s: too large datalen (%d max %d)", __FUNCTION__, res, sizeof(m_Data));
|
rehlds_syserror("%s: too large datalen (%d max %d)", __func__, res, sizeof(m_Data));
|
||||||
|
|
||||||
if (fromLen > sizeof(m_From))
|
if (fromLen > sizeof(m_From))
|
||||||
rehlds_syserror("%s: too large fromlen (%d max %d)", __FUNCTION__, res, sizeof(m_From));
|
rehlds_syserror("%s: too large fromlen (%d max %d)", __func__, res, sizeof(m_From));
|
||||||
|
|
||||||
m_FromLenOut = fromLen;
|
m_FromLenOut = fromLen;
|
||||||
m_Res = res;
|
m_Res = res;
|
||||||
@ -657,10 +657,10 @@ void CRecvFromCall::readEpilogue(std::istream &stream) {
|
|||||||
CSendToCall::CSendToCall(SOCKET s, const void* buf, int len, int flags, const void* to, int tolen)
|
CSendToCall::CSendToCall(SOCKET s, const void* buf, int len, int flags, const void* to, int tolen)
|
||||||
{
|
{
|
||||||
if (len > sizeof(m_Data))
|
if (len > sizeof(m_Data))
|
||||||
rehlds_syserror("%s: too large datalen (%d max %d)", __FUNCTION__, len, sizeof(m_Data));
|
rehlds_syserror("%s: too large datalen (%d max %d)", __func__, len, sizeof(m_Data));
|
||||||
|
|
||||||
if (tolen > sizeof(m_To))
|
if (tolen > sizeof(m_To))
|
||||||
rehlds_syserror("%s: too large tolen (%d max %d)", __FUNCTION__, tolen, sizeof(m_To));
|
rehlds_syserror("%s: too large tolen (%d max %d)", __func__, tolen, sizeof(m_To));
|
||||||
|
|
||||||
m_Socket = s;
|
m_Socket = s;
|
||||||
m_Len = len;
|
m_Len = len;
|
||||||
@ -770,7 +770,7 @@ void CSendToCall::readEpilogue(std::istream &stream) {
|
|||||||
CBindCall::CBindCall(SOCKET s, const void* addr, int addrlen)
|
CBindCall::CBindCall(SOCKET s, const void* addr, int addrlen)
|
||||||
{
|
{
|
||||||
if (addrlen > sizeof(m_Addr))
|
if (addrlen > sizeof(m_Addr))
|
||||||
rehlds_syserror("%s: too large tolen (%d max %d)", __FUNCTION__, addrlen, sizeof(m_Addr));
|
rehlds_syserror("%s: too large tolen (%d max %d)", __func__, addrlen, sizeof(m_Addr));
|
||||||
|
|
||||||
m_Socket = s;
|
m_Socket = s;
|
||||||
m_AddrLen = addrlen;
|
m_AddrLen = addrlen;
|
||||||
@ -854,7 +854,7 @@ std::string CGetSockNameCall::toString()
|
|||||||
void CGetSockNameCall::setResult(const void* addr, int addrlen, int res)
|
void CGetSockNameCall::setResult(const void* addr, int addrlen, int res)
|
||||||
{
|
{
|
||||||
if (addrlen > sizeof(m_Addr))
|
if (addrlen > sizeof(m_Addr))
|
||||||
rehlds_syserror("%s: too large tolen (%d max %d)", __FUNCTION__, addrlen, sizeof(m_Addr));
|
rehlds_syserror("%s: too large tolen (%d max %d)", __func__, addrlen, sizeof(m_Addr));
|
||||||
|
|
||||||
m_Res = res;
|
m_Res = res;
|
||||||
m_AddrLenOut = addrlen;
|
m_AddrLenOut = addrlen;
|
||||||
@ -946,7 +946,7 @@ void CWSAGetLastErrorCall::readEpilogue(std::istream &stream) {
|
|||||||
CSteamCallbackCall1::CSteamCallbackCall1(int cbId, void* data, int dataSize, CCallbackBase* cb)
|
CSteamCallbackCall1::CSteamCallbackCall1(int cbId, void* data, int dataSize, CCallbackBase* cb)
|
||||||
{
|
{
|
||||||
if (dataSize > sizeof(m_Data))
|
if (dataSize > sizeof(m_Data))
|
||||||
rehlds_syserror("%s: too large data (%d, max %d)", __FUNCTION__, dataSize, sizeof(m_Data));
|
rehlds_syserror("%s: too large data (%d, max %d)", __func__, dataSize, sizeof(m_Data));
|
||||||
|
|
||||||
m_CallbackId = cbId;
|
m_CallbackId = cbId;
|
||||||
m_DataSize = dataSize;
|
m_DataSize = dataSize;
|
||||||
@ -1009,7 +1009,7 @@ void CSteamCallbackCall1::readEpilogue(std::istream &stream) {
|
|||||||
CSteamCallbackCall2::CSteamCallbackCall2(int cbId, void* data, int dataSize, bool ioFailure, SteamAPICall_t apiCall, CCallbackBase* cb)
|
CSteamCallbackCall2::CSteamCallbackCall2(int cbId, void* data, int dataSize, bool ioFailure, SteamAPICall_t apiCall, CCallbackBase* cb)
|
||||||
{
|
{
|
||||||
if (dataSize > sizeof(m_Data))
|
if (dataSize > sizeof(m_Data))
|
||||||
rehlds_syserror("%s: too large data (%d, max %d)", __FUNCTION__, dataSize, sizeof(m_Data));
|
rehlds_syserror("%s: too large data (%d, max %d)", __func__, dataSize, sizeof(m_Data));
|
||||||
|
|
||||||
m_CallbackId = cbId;
|
m_CallbackId = cbId;
|
||||||
m_DataSize = dataSize;
|
m_DataSize = dataSize;
|
||||||
@ -1273,11 +1273,11 @@ std::string CSteamAppGetCurrentGameLanguageCall::toString()
|
|||||||
void CSteamAppGetCurrentGameLanguageCall::setResult(const char* res)
|
void CSteamAppGetCurrentGameLanguageCall::setResult(const char* res)
|
||||||
{
|
{
|
||||||
if (res == NULL)
|
if (res == NULL)
|
||||||
rehlds_syserror("%s: null result", __FUNCTION__);
|
rehlds_syserror("%s: null result", __func__);
|
||||||
|
|
||||||
m_ResLen = strlen(res) + 1;
|
m_ResLen = strlen(res) + 1;
|
||||||
if (m_ResLen > sizeof(m_Res))
|
if (m_ResLen > sizeof(m_Res))
|
||||||
rehlds_syserror("%s: too large result", __FUNCTION__);
|
rehlds_syserror("%s: too large result", __func__);
|
||||||
|
|
||||||
memcpy(m_Res, res, m_ResLen);
|
memcpy(m_Res, res, m_ResLen);
|
||||||
}
|
}
|
||||||
@ -1312,11 +1312,11 @@ void CSteamAppGetCurrentGameLanguageCall::readEpilogue(std::istream &stream) {
|
|||||||
CSteamGameServerInitCall::CSteamGameServerInitCall(uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString)
|
CSteamGameServerInitCall::CSteamGameServerInitCall(uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString)
|
||||||
{
|
{
|
||||||
if (pchVersionString == NULL)
|
if (pchVersionString == NULL)
|
||||||
rehlds_syserror("%s: version is null", __FUNCTION__);
|
rehlds_syserror("%s: version is null", __func__);
|
||||||
|
|
||||||
m_VersionLen = strlen(pchVersionString) + 1;
|
m_VersionLen = strlen(pchVersionString) + 1;
|
||||||
if (m_VersionLen > sizeof(m_Version))
|
if (m_VersionLen > sizeof(m_Version))
|
||||||
rehlds_syserror("%s: too long version string", __FUNCTION__);
|
rehlds_syserror("%s: too long version string", __func__);
|
||||||
|
|
||||||
memcpy(m_Version, pchVersionString, m_VersionLen);
|
memcpy(m_Version, pchVersionString, m_VersionLen);
|
||||||
m_IP = unIP;
|
m_IP = unIP;
|
||||||
@ -1439,11 +1439,11 @@ void CSteamGameServerCall::readEpilogue(std::istream &stream) {
|
|||||||
CGameServerSetProductCall::CGameServerSetProductCall(const char* product)
|
CGameServerSetProductCall::CGameServerSetProductCall(const char* product)
|
||||||
{
|
{
|
||||||
if (product == NULL)
|
if (product == NULL)
|
||||||
rehlds_syserror("%s: product is null", __FUNCTION__);
|
rehlds_syserror("%s: product is null", __func__);
|
||||||
|
|
||||||
m_ProductLen = strlen(product) + 1;
|
m_ProductLen = strlen(product) + 1;
|
||||||
if (m_ProductLen > sizeof(m_Product))
|
if (m_ProductLen > sizeof(m_Product))
|
||||||
rehlds_syserror("%s: too long product string", __FUNCTION__);
|
rehlds_syserror("%s: too long product string", __func__);
|
||||||
|
|
||||||
memcpy(m_Product, product, m_ProductLen);
|
memcpy(m_Product, product, m_ProductLen);
|
||||||
}
|
}
|
||||||
@ -1491,11 +1491,11 @@ void CGameServerSetProductCall::readPrologue(std::istream &stream) {
|
|||||||
CGameServerSetModDirCall::CGameServerSetModDirCall(const char* dir)
|
CGameServerSetModDirCall::CGameServerSetModDirCall(const char* dir)
|
||||||
{
|
{
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
rehlds_syserror("%s: dir is null", __FUNCTION__);
|
rehlds_syserror("%s: dir is null", __func__);
|
||||||
|
|
||||||
m_DirLen = strlen(dir) + 1;
|
m_DirLen = strlen(dir) + 1;
|
||||||
if (m_DirLen > sizeof(m_Dir))
|
if (m_DirLen > sizeof(m_Dir))
|
||||||
rehlds_syserror("%s: too long dir string", __FUNCTION__);
|
rehlds_syserror("%s: too long dir string", __func__);
|
||||||
|
|
||||||
memcpy(m_Dir, dir, m_DirLen);
|
memcpy(m_Dir, dir, m_DirLen);
|
||||||
}
|
}
|
||||||
@ -1583,11 +1583,11 @@ void CGameServerSetDedicatedServerCall::readPrologue(std::istream &stream) {
|
|||||||
CGameServerSetGameDescCall::CGameServerSetGameDescCall(const char* desc)
|
CGameServerSetGameDescCall::CGameServerSetGameDescCall(const char* desc)
|
||||||
{
|
{
|
||||||
if (desc == NULL)
|
if (desc == NULL)
|
||||||
rehlds_syserror("%s: desc is null", __FUNCTION__);
|
rehlds_syserror("%s: desc is null", __func__);
|
||||||
|
|
||||||
m_DescLen = strlen(desc) + 1;
|
m_DescLen = strlen(desc) + 1;
|
||||||
if (m_DescLen > sizeof(m_Desc))
|
if (m_DescLen > sizeof(m_Desc))
|
||||||
rehlds_syserror("%s: too long dir string", __FUNCTION__);
|
rehlds_syserror("%s: too long dir string", __func__);
|
||||||
|
|
||||||
memcpy(m_Desc, desc, m_DescLen);
|
memcpy(m_Desc, desc, m_DescLen);
|
||||||
}
|
}
|
||||||
@ -1813,11 +1813,11 @@ void CGameServerSetBotCountCall::readPrologue(std::istream &stream) {
|
|||||||
CGameServerSetServerNameCall::CGameServerSetServerNameCall(const char* serverName)
|
CGameServerSetServerNameCall::CGameServerSetServerNameCall(const char* serverName)
|
||||||
{
|
{
|
||||||
if (serverName == NULL)
|
if (serverName == NULL)
|
||||||
rehlds_syserror("%s: serverName is null", __FUNCTION__);
|
rehlds_syserror("%s: serverName is null", __func__);
|
||||||
|
|
||||||
m_ServerNameLen = strlen(serverName) + 1;
|
m_ServerNameLen = strlen(serverName) + 1;
|
||||||
if (m_ServerNameLen > sizeof(m_ServerName))
|
if (m_ServerNameLen > sizeof(m_ServerName))
|
||||||
rehlds_syserror("%s: too long serverName string", __FUNCTION__);
|
rehlds_syserror("%s: too long serverName string", __func__);
|
||||||
|
|
||||||
memcpy(m_ServerName, serverName, m_ServerNameLen);
|
memcpy(m_ServerName, serverName, m_ServerNameLen);
|
||||||
}
|
}
|
||||||
@ -1865,11 +1865,11 @@ void CGameServerSetServerNameCall::readPrologue(std::istream &stream) {
|
|||||||
CGameServerSetMapNameCall::CGameServerSetMapNameCall(const char* mapName)
|
CGameServerSetMapNameCall::CGameServerSetMapNameCall(const char* mapName)
|
||||||
{
|
{
|
||||||
if (mapName == NULL)
|
if (mapName == NULL)
|
||||||
rehlds_syserror("%s: serverName is null", __FUNCTION__);
|
rehlds_syserror("%s: serverName is null", __func__);
|
||||||
|
|
||||||
m_MapNameLen = strlen(mapName) + 1;
|
m_MapNameLen = strlen(mapName) + 1;
|
||||||
if (m_MapNameLen > sizeof(m_MapName))
|
if (m_MapNameLen > sizeof(m_MapName))
|
||||||
rehlds_syserror("%s: too long mapName string", __FUNCTION__);
|
rehlds_syserror("%s: too long mapName string", __func__);
|
||||||
|
|
||||||
memcpy(m_MapName, mapName, m_MapNameLen);
|
memcpy(m_MapName, mapName, m_MapNameLen);
|
||||||
}
|
}
|
||||||
@ -1980,20 +1980,20 @@ bool CGameServerClearAllKVsCall::compareInputArgs(IEngExtCall* other, bool stric
|
|||||||
CGameServerSetKeyValueCall::CGameServerSetKeyValueCall(const char* key, const char* value)
|
CGameServerSetKeyValueCall::CGameServerSetKeyValueCall(const char* key, const char* value)
|
||||||
{
|
{
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
rehlds_syserror("%s: key is null", __FUNCTION__);
|
rehlds_syserror("%s: key is null", __func__);
|
||||||
|
|
||||||
m_KeyLen = strlen(key) + 1;
|
m_KeyLen = strlen(key) + 1;
|
||||||
if (m_KeyLen > sizeof(m_Key))
|
if (m_KeyLen > sizeof(m_Key))
|
||||||
rehlds_syserror("%s: too long key string", __FUNCTION__);
|
rehlds_syserror("%s: too long key string", __func__);
|
||||||
|
|
||||||
memcpy(m_Key, key, m_KeyLen);
|
memcpy(m_Key, key, m_KeyLen);
|
||||||
|
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
rehlds_syserror("%s: value is null", __FUNCTION__);
|
rehlds_syserror("%s: value is null", __func__);
|
||||||
|
|
||||||
m_ValueLen = strlen(value) + 1;
|
m_ValueLen = strlen(value) + 1;
|
||||||
if (m_ValueLen > sizeof(m_Value))
|
if (m_ValueLen > sizeof(m_Value))
|
||||||
rehlds_syserror("%s: too long value string", __FUNCTION__);
|
rehlds_syserror("%s: too long value string", __func__);
|
||||||
|
|
||||||
memcpy(m_Value, value, m_ValueLen);
|
memcpy(m_Value, value, m_ValueLen);
|
||||||
}
|
}
|
||||||
@ -2156,17 +2156,17 @@ void CGameServerGetNextOutgoingPacketCall::setResult(void* buf, int res, uint32*
|
|||||||
m_BufLen = res > 0 ? res : 0;
|
m_BufLen = res > 0 ? res : 0;
|
||||||
if (m_BufLen > 0) {
|
if (m_BufLen > 0) {
|
||||||
if (m_BufLen > sizeof(m_Buf))
|
if (m_BufLen > sizeof(m_Buf))
|
||||||
rehlds_syserror("%s: too long buffer returned", __FUNCTION__);
|
rehlds_syserror("%s: too long buffer returned", __func__);
|
||||||
|
|
||||||
memcpy(m_Buf, buf, m_BufLen);
|
memcpy(m_Buf, buf, m_BufLen);
|
||||||
}
|
}
|
||||||
m_Result = res;
|
m_Result = res;
|
||||||
|
|
||||||
if (pAddr == NULL)
|
if (pAddr == NULL)
|
||||||
rehlds_syserror("%s: pAddr is NULL", __FUNCTION__);
|
rehlds_syserror("%s: pAddr is NULL", __func__);
|
||||||
|
|
||||||
if (pPort == NULL)
|
if (pPort == NULL)
|
||||||
rehlds_syserror("%s: pPort is NULL", __FUNCTION__);
|
rehlds_syserror("%s: pPort is NULL", __func__);
|
||||||
|
|
||||||
m_Addr = *pAddr;
|
m_Addr = *pAddr;
|
||||||
m_Port = *pPort;
|
m_Port = *pPort;
|
||||||
@ -2318,7 +2318,7 @@ CGameServerHandleIncomingPacketCall::CGameServerHandleIncomingPacketCall(const v
|
|||||||
{
|
{
|
||||||
m_Len = cbData;
|
m_Len = cbData;
|
||||||
if (m_Len > sizeof(m_Data))
|
if (m_Len > sizeof(m_Data))
|
||||||
rehlds_syserror("%s: too long packet", __FUNCTION__);
|
rehlds_syserror("%s: too long packet", __func__);
|
||||||
|
|
||||||
memcpy(m_Data, pData, m_Len);
|
memcpy(m_Data, pData, m_Len);
|
||||||
m_Ip = srcIP;
|
m_Ip = srcIP;
|
||||||
@ -2390,7 +2390,7 @@ CGameServerSendUserConnectAndAuthenticateCall::CGameServerSendUserConnectAndAuth
|
|||||||
{
|
{
|
||||||
m_AuthBlobLen = cubAuthBlobSize;
|
m_AuthBlobLen = cubAuthBlobSize;
|
||||||
if (m_AuthBlobLen > sizeof(m_AuthBlob))
|
if (m_AuthBlobLen > sizeof(m_AuthBlob))
|
||||||
rehlds_syserror("%s: too long auth blob", __FUNCTION__);
|
rehlds_syserror("%s: too long auth blob", __func__);
|
||||||
|
|
||||||
memcpy(m_AuthBlob, pvAuthBlob, m_AuthBlobLen);
|
memcpy(m_AuthBlob, pvAuthBlob, m_AuthBlobLen);
|
||||||
m_IP = unIPClient;
|
m_IP = unIPClient;
|
||||||
@ -2500,7 +2500,7 @@ CGameServerBUpdateUserDataCall::CGameServerBUpdateUserDataCall(CSteamID steamIDU
|
|||||||
{
|
{
|
||||||
m_PlayerNameLen = strlen(pchPlayerName) + 1;
|
m_PlayerNameLen = strlen(pchPlayerName) + 1;
|
||||||
if (m_PlayerNameLen > sizeof(m_PlayerName))
|
if (m_PlayerNameLen > sizeof(m_PlayerName))
|
||||||
rehlds_syserror("%s: too long player name", __FUNCTION__);
|
rehlds_syserror("%s: too long player name", __func__);
|
||||||
|
|
||||||
memcpy(m_PlayerName, pchPlayerName, m_PlayerNameLen);
|
memcpy(m_PlayerName, pchPlayerName, m_PlayerNameLen);
|
||||||
m_SteamId = steamIDUser.ConvertToUint64();
|
m_SteamId = steamIDUser.ConvertToUint64();
|
||||||
@ -2626,7 +2626,7 @@ void CGetHostNameCall::setResult(char* hostName, int res) {
|
|||||||
m_NameLenOut = strlen(hostName) + 1;
|
m_NameLenOut = strlen(hostName) + 1;
|
||||||
|
|
||||||
if (m_NameLenOut > sizeof(m_Name))
|
if (m_NameLenOut > sizeof(m_Name))
|
||||||
rehlds_syserror("%s: too long host name", __FUNCTION__);
|
rehlds_syserror("%s: too long host name", __func__);
|
||||||
|
|
||||||
strcpy(m_Name, hostName);
|
strcpy(m_Name, hostName);
|
||||||
m_Res = res;
|
m_Res = res;
|
||||||
@ -2665,7 +2665,7 @@ CGetHostByNameCall::CGetHostByNameCall(const char* name)
|
|||||||
{
|
{
|
||||||
m_NameLen = strlen(name) + 1;
|
m_NameLen = strlen(name) + 1;
|
||||||
if (m_NameLen > sizeof(m_Name))
|
if (m_NameLen > sizeof(m_Name))
|
||||||
rehlds_syserror("%s: too long name", __FUNCTION__);
|
rehlds_syserror("%s: too long name", __func__);
|
||||||
|
|
||||||
strcpy(m_Name, name);
|
strcpy(m_Name, name);
|
||||||
}
|
}
|
||||||
@ -2696,19 +2696,19 @@ bool CGetHostByNameCall::compareInputArgs(IEngExtCall* other, bool strict)
|
|||||||
void CGetHostByNameCall::setResult(const hostent* hostEnt) {
|
void CGetHostByNameCall::setResult(const hostent* hostEnt) {
|
||||||
m_HostentData.hostNameLen = strlen(hostEnt->h_name) + 1;
|
m_HostentData.hostNameLen = strlen(hostEnt->h_name) + 1;
|
||||||
if (m_HostentData.hostNameLen > sizeof(m_HostentData.hostName)) {
|
if (m_HostentData.hostNameLen > sizeof(m_HostentData.hostName)) {
|
||||||
rehlds_syserror("%s: too long host name", __FUNCTION__);
|
rehlds_syserror("%s: too long host name", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(m_HostentData.hostName, hostEnt->h_name);
|
strcpy(m_HostentData.hostName, hostEnt->h_name);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (hostEnt->h_aliases[i]) {
|
while (hostEnt->h_aliases[i]) {
|
||||||
if (i >= HOSTENT_DATA_MAX_ALIASES) {
|
if (i >= HOSTENT_DATA_MAX_ALIASES) {
|
||||||
rehlds_syserror("%s: too many aliases", __FUNCTION__);
|
rehlds_syserror("%s: too many aliases", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_HostentData.aliasesLengths[i] = strlen(hostEnt->h_aliases[i]) + 1;
|
m_HostentData.aliasesLengths[i] = strlen(hostEnt->h_aliases[i]) + 1;
|
||||||
if (m_HostentData.aliasesLengths[i] > sizeof(m_HostentData.aliases[i])) {
|
if (m_HostentData.aliasesLengths[i] > sizeof(m_HostentData.aliases[i])) {
|
||||||
rehlds_syserror("%s: too long alias", __FUNCTION__);
|
rehlds_syserror("%s: too long alias", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(m_HostentData.aliases[i], hostEnt->h_aliases[i]);
|
strcpy(m_HostentData.aliases[i], hostEnt->h_aliases[i]);
|
||||||
@ -2719,13 +2719,13 @@ void CGetHostByNameCall::setResult(const hostent* hostEnt) {
|
|||||||
m_HostentData.addrtype = hostEnt->h_addrtype;
|
m_HostentData.addrtype = hostEnt->h_addrtype;
|
||||||
m_HostentData.addrLen = hostEnt->h_length;
|
m_HostentData.addrLen = hostEnt->h_length;
|
||||||
if (m_HostentData.addrLen > sizeof(m_HostentData.addrs[0])) {
|
if (m_HostentData.addrLen > sizeof(m_HostentData.addrs[0])) {
|
||||||
rehlds_syserror("%s: too long addr", __FUNCTION__);
|
rehlds_syserror("%s: too long addr", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (hostEnt->h_addr_list[i]) {
|
while (hostEnt->h_addr_list[i]) {
|
||||||
if (i >= HOSTENT_DATA_MAX_ADDRS) {
|
if (i >= HOSTENT_DATA_MAX_ADDRS) {
|
||||||
rehlds_syserror("%s: too many addrs", __FUNCTION__);
|
rehlds_syserror("%s: too many addrs", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(m_HostentData.addrs[i], hostEnt->h_addr_list[i], m_HostentData.addrLen);
|
memcpy(m_HostentData.addrs[i], hostEnt->h_addr_list[i], m_HostentData.addrLen);
|
||||||
@ -3205,7 +3205,7 @@ virtual void readEpilogue(std::istream &stream);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define IEngExtCallFactory_CreateFuncCall(clazz, buf, bufLen) \
|
#define IEngExtCallFactory_CreateFuncCall(clazz, buf, bufLen) \
|
||||||
if (sizeof(clazz) > bufLen) rehlds_syserror("%s: buffer to small", __FUNCTION__); \
|
if (sizeof(clazz) > bufLen) rehlds_syserror("%s: buffer to small", __func__); \
|
||||||
return new(buf) clazz();
|
return new(buf) clazz();
|
||||||
|
|
||||||
IEngExtCall* IEngExtCallFactory::createByOpcode(ExtCallFuncs opc, void* buf, int ptrSize) {
|
IEngExtCall* IEngExtCallFactory::createByOpcode(ExtCallFuncs opc, void* buf, int ptrSize) {
|
||||||
@ -3286,7 +3286,7 @@ IEngExtCall* IEngExtCallFactory::createByOpcode(ExtCallFuncs opc, void* buf, int
|
|||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
rehlds_syserror("%s: unknown funccall opcode %d", __FUNCTION__, opc);
|
rehlds_syserror("%s: unknown funccall opcode %d", __func__, opc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,8 +19,8 @@ CSteamCallbackRecordingWrapper::CSteamCallbackRecordingWrapper(CRecordingEngExtI
|
|||||||
|
|
||||||
void CSteamCallbackRecordingWrapper::Run(void *pvParam)
|
void CSteamCallbackRecordingWrapper::Run(void *pvParam)
|
||||||
{
|
{
|
||||||
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __FUNCTION__);
|
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __func__);
|
||||||
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
CSteamCallbackCall1 fcall(m_Id, pvParam, m_Size, m_Wrapped); CRecorderFuncCall frec(&fcall);
|
CSteamCallbackCall1 fcall(m_Id, pvParam, m_Size, m_Wrapped); CRecorderFuncCall frec(&fcall);
|
||||||
m_Recorder->PushFunc(&frec);
|
m_Recorder->PushFunc(&frec);
|
||||||
@ -33,8 +33,8 @@ void CSteamCallbackRecordingWrapper::Run(void *pvParam)
|
|||||||
|
|
||||||
void CSteamCallbackRecordingWrapper::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall)
|
void CSteamCallbackRecordingWrapper::Run(void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall)
|
||||||
{
|
{
|
||||||
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __FUNCTION__);
|
if (m_Wrapped->GetICallback() != this->GetICallback()) rehlds_syserror("%s: iCallback desync", __func__);
|
||||||
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (m_Wrapped->GetFlags() != this->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
CSteamCallbackCall2 fcall(m_Id, pvParam, m_Size, bIOFailure, hSteamAPICall, m_Wrapped); CRecorderFuncCall frec(&fcall);
|
CSteamCallbackCall2 fcall(m_Id, pvParam, m_Size, bIOFailure, hSteamAPICall, m_Wrapped); CRecorderFuncCall frec(&fcall);
|
||||||
m_Recorder->PushFunc(&frec);
|
m_Recorder->PushFunc(&frec);
|
||||||
@ -61,25 +61,25 @@ CSteamAppsRecordingWrapper::CSteamAppsRecordingWrapper(ISteamApps* original, CRe
|
|||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsSubscribed()
|
bool CSteamAppsRecordingWrapper::BIsSubscribed()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsLowViolence()
|
bool CSteamAppsRecordingWrapper::BIsLowViolence()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsCybercafe()
|
bool CSteamAppsRecordingWrapper::BIsCybercafe()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsVACBanned()
|
bool CSteamAppsRecordingWrapper::BIsVACBanned()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,82 +95,82 @@ const char* CSteamAppsRecordingWrapper::GetCurrentGameLanguage()
|
|||||||
|
|
||||||
const char* CSteamAppsRecordingWrapper::GetAvailableGameLanguages()
|
const char* CSteamAppsRecordingWrapper::GetAvailableGameLanguages()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsSubscribedApp(AppId_t appID)
|
bool CSteamAppsRecordingWrapper::BIsSubscribedApp(AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsDlcInstalled(AppId_t appID)
|
bool CSteamAppsRecordingWrapper::BIsDlcInstalled(AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsRecordingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID)
|
uint32 CSteamAppsRecordingWrapper::GetEarliestPurchaseUnixTime(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BIsSubscribedFromFreeWeekend()
|
bool CSteamAppsRecordingWrapper::BIsSubscribedFromFreeWeekend()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSteamAppsRecordingWrapper::GetDLCCount()
|
int CSteamAppsRecordingWrapper::GetDLCCount()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
|
bool CSteamAppsRecordingWrapper::BGetDLCDataByIndex(int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsRecordingWrapper::InstallDLC(AppId_t nAppID)
|
void CSteamAppsRecordingWrapper::InstallDLC(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsRecordingWrapper::UninstallDLC(AppId_t nAppID)
|
void CSteamAppsRecordingWrapper::UninstallDLC(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamAppsRecordingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID)
|
void CSteamAppsRecordingWrapper::RequestAppProofOfPurchaseKey(AppId_t nAppID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize)
|
bool CSteamAppsRecordingWrapper::GetCurrentBetaName(char *pchName, int cchNameBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamAppsRecordingWrapper::MarkContentCorrupt(bool bMissingFilesOnly)
|
bool CSteamAppsRecordingWrapper::MarkContentCorrupt(bool bMissingFilesOnly)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsRecordingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots)
|
uint32 CSteamAppsRecordingWrapper::GetInstalledDepots(DepotId_t *pvecDepots, uint32 cMaxDepots)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamAppsRecordingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize)
|
uint32 CSteamAppsRecordingWrapper::GetAppInstallDir(AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ CSteamGameServerRecordingWrapper::CSteamGameServerRecordingWrapper(ISteamGameSer
|
|||||||
|
|
||||||
bool CSteamGameServerRecordingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString)
|
bool CSteamGameServerRecordingWrapper::InitGameServer(uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ void CSteamGameServerRecordingWrapper::SetDedicatedServer(bool bDedicated)
|
|||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::LogOn(const char *pszAccountName, const char *pszPassword)
|
void CSteamGameServerRecordingWrapper::LogOn(const char *pszAccountName, const char *pszPassword)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::LogOnAnonymous()
|
void CSteamGameServerRecordingWrapper::LogOnAnonymous()
|
||||||
@ -322,12 +322,12 @@ void CSteamGameServerRecordingWrapper::SetPasswordProtected(bool bPasswordProtec
|
|||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::SetSpectatorPort(uint16 unSpectatorPort)
|
void CSteamGameServerRecordingWrapper::SetSpectatorPort(uint16 unSpectatorPort)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::SetSpectatorServerName(const char *pszSpectatorServerName)
|
void CSteamGameServerRecordingWrapper::SetSpectatorServerName(const char *pszSpectatorServerName)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::ClearAllKeyValues()
|
void CSteamGameServerRecordingWrapper::ClearAllKeyValues()
|
||||||
@ -348,17 +348,17 @@ void CSteamGameServerRecordingWrapper::SetKeyValue(const char *pKey, const char
|
|||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::SetGameTags(const char *pchGameTags)
|
void CSteamGameServerRecordingWrapper::SetGameTags(const char *pchGameTags)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::SetGameData(const char *pchGameData)
|
void CSteamGameServerRecordingWrapper::SetGameData(const char *pchGameData)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::SetRegion(const char *pszRegion)
|
void CSteamGameServerRecordingWrapper::SetRegion(const char *pszRegion)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerRecordingWrapper::SendUserConnectAndAuthenticate(uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser)
|
bool CSteamGameServerRecordingWrapper::SendUserConnectAndAuthenticate(uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser)
|
||||||
@ -401,52 +401,52 @@ bool CSteamGameServerRecordingWrapper::BUpdateUserData(CSteamID steamIDUser, con
|
|||||||
|
|
||||||
HAuthTicket CSteamGameServerRecordingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket)
|
HAuthTicket CSteamGameServerRecordingWrapper::GetAuthSessionTicket(void *pTicket, int cbMaxTicket, uint32 *pcbTicket)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_HAuthTicketInvalid;
|
return k_HAuthTicketInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
EBeginAuthSessionResult CSteamGameServerRecordingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID)
|
EBeginAuthSessionResult CSteamGameServerRecordingWrapper::BeginAuthSession(const void *pAuthTicket, int cbAuthTicket, CSteamID steamID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_EBeginAuthSessionResultInvalidTicket;
|
return k_EBeginAuthSessionResultInvalidTicket;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::EndAuthSession(CSteamID steamID)
|
void CSteamGameServerRecordingWrapper::EndAuthSession(CSteamID steamID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket)
|
void CSteamGameServerRecordingWrapper::CancelAuthTicket(HAuthTicket hAuthTicket)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
EUserHasLicenseForAppResult CSteamGameServerRecordingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
|
EUserHasLicenseForAppResult CSteamGameServerRecordingWrapper::UserHasLicenseForApp(CSteamID steamID, AppId_t appID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_EUserHasLicenseResultDoesNotHaveLicense;
|
return k_EUserHasLicenseResultDoesNotHaveLicense;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSteamGameServerRecordingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
|
bool CSteamGameServerRecordingWrapper::RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::GetGameplayStats()
|
void CSteamGameServerRecordingWrapper::GetGameplayStats()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerRecordingWrapper::GetServerReputation()
|
SteamAPICall_t CSteamGameServerRecordingWrapper::GetServerReputation()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 CSteamGameServerRecordingWrapper::GetPublicIP()
|
uint32 CSteamGameServerRecordingWrapper::GetPublicIP()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,18 +488,18 @@ void CSteamGameServerRecordingWrapper::SetHeartbeatInterval(int iHeartbeatInterv
|
|||||||
|
|
||||||
void CSteamGameServerRecordingWrapper::ForceHeartbeat()
|
void CSteamGameServerRecordingWrapper::ForceHeartbeat()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerRecordingWrapper::AssociateWithClan(CSteamID steamIDClan)
|
SteamAPICall_t CSteamGameServerRecordingWrapper::AssociateWithClan(CSteamID steamIDClan)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPICall_t CSteamGameServerRecordingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
|
SteamAPICall_t CSteamGameServerRecordingWrapper::ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return k_uAPICallInvalid;
|
return k_uAPICallInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,7 +574,7 @@ void CRecordingEngExtInterceptor::PushFunc(CRecorderFuncCall* func)
|
|||||||
void CRecordingEngExtInterceptor::PopFunc(CRecorderFuncCall* func)
|
void CRecordingEngExtInterceptor::PopFunc(CRecorderFuncCall* func)
|
||||||
{
|
{
|
||||||
if (func != m_LastFunc)
|
if (func != m_LastFunc)
|
||||||
rehlds_syserror("%s: stack corrupted", __FUNCTION__);
|
rehlds_syserror("%s: stack corrupted", __func__);
|
||||||
|
|
||||||
writeCall(!func->m_StartWritten, true, func->m_FuncCall);
|
writeCall(!func->m_StartWritten, true, func->m_FuncCall);
|
||||||
if (m_LastFunc->m_Prev == NULL) {
|
if (m_LastFunc->m_Prev == NULL) {
|
||||||
@ -842,8 +842,8 @@ void CRecordingEngExtInterceptor::SteamAPI_RegisterCallback(CCallbackBase *pCall
|
|||||||
{
|
{
|
||||||
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
//if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
//if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
CSteamApiRegisterCallbackCall fcall(wrappee->getRehldsCallbackId(), iCallback, wrappee); CRecorderFuncCall frec(&fcall);
|
CSteamApiRegisterCallbackCall fcall(wrappee->getRehldsCallbackId(), iCallback, wrappee); CRecorderFuncCall frec(&fcall);
|
||||||
PushFunc(&frec);
|
PushFunc(&frec);
|
||||||
@ -870,8 +870,8 @@ void CRecordingEngExtInterceptor::SteamAPI_UnregisterCallResult(class CCallbackB
|
|||||||
{
|
{
|
||||||
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
CSteamApiUnrigestierCallResultCall fcall(wrappee->getRehldsCallbackId(), hAPICall, wrappee); CRecorderFuncCall frec(&fcall);
|
CSteamApiUnrigestierCallResultCall fcall(wrappee->getRehldsCallbackId(), hAPICall, wrappee); CRecorderFuncCall frec(&fcall);
|
||||||
|
|
||||||
@ -981,8 +981,8 @@ void CRecordingEngExtInterceptor::SteamAPI_UnregisterCallback(CCallbackBase *pCa
|
|||||||
{
|
{
|
||||||
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
CSteamCallbackRecordingWrapper* wrappee = getOrCreateCallbackWrapper(pCallback);
|
||||||
|
|
||||||
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetFlags() != pCallback->GetFlags()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __FUNCTION__);
|
if (wrappee->GetICallback() != pCallback->GetICallback()) rehlds_syserror("%s: flags desync", __func__);
|
||||||
|
|
||||||
CSteamApiUnregisterCallbackCall fcall(wrappee->getRehldsCallbackId(), wrappee); CRecorderFuncCall frec(&fcall);
|
CSteamApiUnregisterCallbackCall fcall(wrappee->getRehldsCallbackId(), wrappee); CRecorderFuncCall frec(&fcall);
|
||||||
PushFunc(&frec);
|
PushFunc(&frec);
|
||||||
|
@ -12,7 +12,7 @@ uint32 __cdecl time_hooked(uint32* pTime)
|
|||||||
struct tm* __cdecl localtime_hooked(uint32* pTime)
|
struct tm* __cdecl localtime_hooked(uint32* pTime)
|
||||||
{
|
{
|
||||||
if (pTime == NULL)
|
if (pTime == NULL)
|
||||||
rehlds_syserror("%s: pTime is NULL", __FUNCTION__);
|
rehlds_syserror("%s: pTime is NULL", __func__);
|
||||||
|
|
||||||
return CRehldsPlatformHolder::get()->localtime(*pTime);
|
return CRehldsPlatformHolder::get()->localtime(*pTime);
|
||||||
}
|
}
|
||||||
@ -119,12 +119,12 @@ int __stdcall gethostname_hooked(char *name, int namelen)
|
|||||||
|
|
||||||
void __cdecl SteamAPI_SetMiniDumpComment_hooked(const char *pchMsg)
|
void __cdecl SteamAPI_SetMiniDumpComment_hooked(const char *pchMsg)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl SteamAPI_WriteMiniDump_hooked(uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID)
|
void __cdecl SteamAPI_WriteMiniDump_hooked(uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl SteamAPI_RegisterCallback_hooked(class CCallbackBase *pCallback, int iCallback)
|
void __cdecl SteamAPI_RegisterCallback_hooked(class CCallbackBase *pCallback, int iCallback)
|
||||||
@ -144,13 +144,13 @@ bool __cdecl SteamAPI_Init_hooked()
|
|||||||
|
|
||||||
ISteamUser* __cdecl SteamUser_hooked()
|
ISteamUser* __cdecl SteamUser_hooked()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ISteamFriends* __cdecl SteamFriends_hooked()
|
ISteamFriends* __cdecl SteamFriends_hooked()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ void __cdecl SteamGameServer_RunCallbacks_hooked()
|
|||||||
|
|
||||||
void __cdecl SteamAPI_Shutdown_hooked()
|
void __cdecl SteamAPI_Shutdown_hooked()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cdecl SteamGameServer_Shutdown_hooked()
|
void __cdecl SteamGameServer_Shutdown_hooked()
|
||||||
@ -191,12 +191,12 @@ void __cdecl SteamAPI_SetBreakpadAppID_hooked(uint32 unAppID)
|
|||||||
|
|
||||||
void __cdecl SteamAPI_RegisterCallResult_hooked(class CCallbackBase *pCallback, SteamAPICall_t hAPICall)
|
void __cdecl SteamAPI_RegisterCallResult_hooked(class CCallbackBase *pCallback, SteamAPICall_t hAPICall)
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
ISteamHTTP* __cdecl SteamHTTP_hooked()
|
ISteamHTTP* __cdecl SteamHTTP_hooked()
|
||||||
{
|
{
|
||||||
rehlds_syserror("%s: not implemented", __FUNCTION__);
|
rehlds_syserror("%s: not implemented", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user