engine: server: don't assert for NULL player in FatPAS/PVS if we don't need it

This commit is contained in:
Alibek Omarov 2021-12-18 03:32:40 +03:00
parent 7a0a355baf
commit ca3544d559

View File

@ -4150,13 +4150,13 @@ byte *pfnSetFatPVS( const float *org )
if( !sv.worldmodel->visdata || sv_novis->value || !org || CL_DisableVisibility( ))
fullvis = true;
ASSERT( pfnGetCurrentPlayer() != -1 );
// portals can't change viewpoint!
if( !FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
{
vec3_t viewPos, offset;
ASSERT( pfnGetCurrentPlayer() != -1 );
// see code from client.cpp for understanding:
// org = pView->v.origin + pView->v.view_ofs;
// if ( pView->v.flags & FL_DUCKING )
@ -4200,13 +4200,13 @@ byte *pfnSetFatPAS( const float *org )
if( !sv.worldmodel->visdata || sv_novis->value || !org || CL_DisableVisibility( ))
fullvis = true;
ASSERT( pfnGetCurrentPlayer() != -1 );
// portals can't change viewpoint!
if( !FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
{
vec3_t viewPos, offset;
ASSERT( pfnGetCurrentPlayer() != -1 );
// see code from client.cpp for understanding:
// org = pView->v.origin + pView->v.view_ofs;
// if ( pView->v.flags & FL_DUCKING )