2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

SV_FatPVS/SV_FatPAS: Sanity checks, gPVSRowBytes is not used for singleplayer

This commit is contained in:
s1lentq 2021-05-03 00:39:06 +07:00
parent 80c40ce0c0
commit 2f70b6cba5

View File

@ -4057,10 +4057,12 @@ void SV_AddToFatPVS(vec_t *org, mnode_t *node)
unsigned char* EXT_FUNC SV_FatPVS(float *org)
{
#ifdef REHLDS_FIXES
fatbytes = gPVSRowBytes;
#else // REHLDS_FIXES
fatbytes = (g_psv.worldmodel->numleafs + 31) >> 3;
if (gPVS)
fatbytes = gPVSRowBytes;
else
#endif // REHLDS_FIXES
fatbytes = (g_psv.worldmodel->numleafs + 31) >> 3;
Q_memset(fatpvs, 0, fatbytes);
SV_AddToFatPVS(org, g_psv.worldmodel->nodes);
return fatpvs;
@ -4112,10 +4114,12 @@ void SV_AddToFatPAS(vec_t *org, mnode_t *node)
unsigned char* EXT_FUNC SV_FatPAS(float *org)
{
#ifdef REHLDS_FIXES
fatpasbytes = gPVSRowBytes;
#else // REHLDS_FIXES
fatpasbytes = (g_psv.worldmodel->numleafs + 31) >> 3;
if (gPAS)
fatpasbytes = gPVSRowBytes;
else
#endif // REHLDS_FIXES
fatpasbytes = (g_psv.worldmodel->numleafs + 31) >> 3;
Q_memset(fatpas, 0, fatpasbytes);
SV_AddToFatPAS(org, g_psv.worldmodel->nodes);
return fatpas;