engine: common: add phs flag to Mod_FatPVS, unused currently
This commit is contained in:
parent
677b0170aa
commit
e310c666b1
4 changed files with 11 additions and 12 deletions
|
@ -20,7 +20,7 @@ GNU General Public License for more details.
|
||||||
|
|
||||||
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis )
|
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis )
|
||||||
{
|
{
|
||||||
return Mod_FatPVS( org, radius, visbuffer, world.visbytes, merge, fullvis );
|
return Mod_FatPVS( org, radius, visbuffer, world.visbytes, merge, fullvis, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
lightstyle_t *CL_GetLightStyle( int number )
|
lightstyle_t *CL_GetLightStyle( int number )
|
||||||
|
|
|
@ -684,7 +684,7 @@ Mod_FatPVS_RecursiveBSPNode
|
||||||
|
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
static void Mod_FatPVS_RecursiveBSPNode( const vec3_t org, float radius, byte *visbuffer, int visbytes, mnode_t *node )
|
static void Mod_FatPVS_RecursiveBSPNode( const vec3_t org, float radius, byte *visbuffer, int visbytes, mnode_t *node, qboolean phs )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -699,7 +699,7 @@ static void Mod_FatPVS_RecursiveBSPNode( const vec3_t org, float radius, byte *v
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// go down both sides
|
// go down both sides
|
||||||
Mod_FatPVS_RecursiveBSPNode( org, radius, visbuffer, visbytes, node->children[0] );
|
Mod_FatPVS_RecursiveBSPNode( org, radius, visbuffer, visbytes, node->children[0], phs );
|
||||||
node = node->children[1];
|
node = node->children[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -709,8 +709,7 @@ static void Mod_FatPVS_RecursiveBSPNode( const vec3_t org, float radius, byte *v
|
||||||
{
|
{
|
||||||
byte *vis = Mod_DecompressPVS( ((mleaf_t *)node)->compressed_vis, world.visbytes );
|
byte *vis = Mod_DecompressPVS( ((mleaf_t *)node)->compressed_vis, world.visbytes );
|
||||||
|
|
||||||
for( i = 0; i < visbytes; i++ )
|
Q_memor( visbuffer, vis, visbytes );
|
||||||
visbuffer[i] |= vis[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -722,7 +721,7 @@ Calculates a PVS that is the inclusive or of all leafs
|
||||||
within radius pixels of the given point.
|
within radius pixels of the given point.
|
||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
int Mod_FatPVS( const vec3_t org, float radius, byte *visbuffer, int visbytes, qboolean merge, qboolean fullvis )
|
int Mod_FatPVS( const vec3_t org, float radius, byte *visbuffer, int visbytes, qboolean merge, qboolean fullvis, qboolean phs )
|
||||||
{
|
{
|
||||||
int bytes = world.visbytes;
|
int bytes = world.visbytes;
|
||||||
mleaf_t *leaf = NULL;
|
mleaf_t *leaf = NULL;
|
||||||
|
@ -741,7 +740,7 @@ int Mod_FatPVS( const vec3_t org, float radius, byte *visbuffer, int visbytes, q
|
||||||
|
|
||||||
if( !merge ) memset( visbuffer, 0x00, bytes );
|
if( !merge ) memset( visbuffer, 0x00, bytes );
|
||||||
|
|
||||||
Mod_FatPVS_RecursiveBSPNode( org, radius, visbuffer, bytes, worldmodel->nodes );
|
Mod_FatPVS_RecursiveBSPNode( org, radius, visbuffer, bytes, worldmodel->nodes, phs );
|
||||||
|
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,7 @@ void Mod_FreeUnused( void );
|
||||||
void Mod_LoadBrushModel( model_t *mod, const void *buffer, qboolean *loaded );
|
void Mod_LoadBrushModel( model_t *mod, const void *buffer, qboolean *loaded );
|
||||||
qboolean Mod_TestBmodelLumps( file_t *f, const char *name, const byte *mod_base, qboolean silent, dlump_t *entities );
|
qboolean Mod_TestBmodelLumps( file_t *f, const char *name, const byte *mod_base, qboolean silent, dlump_t *entities );
|
||||||
qboolean Mod_HeadnodeVisible( mnode_t *node, const byte *visbits, int *lastleaf );
|
qboolean Mod_HeadnodeVisible( mnode_t *node, const byte *visbits, int *lastleaf );
|
||||||
int Mod_FatPVS( const vec3_t org, float radius, byte *visbuffer, int visbytes, qboolean merge, qboolean fullvis );
|
int Mod_FatPVS( const vec3_t org, float radius, byte *visbuffer, int visbytes, qboolean merge, qboolean fullvis, qboolean false );
|
||||||
qboolean Mod_BoxVisible( const vec3_t mins, const vec3_t maxs, const byte *visbits );
|
qboolean Mod_BoxVisible( const vec3_t mins, const vec3_t maxs, const byte *visbits );
|
||||||
int Mod_CheckLump( const char *filename, const int lump, int *lumpsize );
|
int Mod_CheckLump( const char *filename, const int lump, int *lumpsize );
|
||||||
int Mod_ReadLump( const char *filename, const int lump, void **lumpdata, int *lumpsize );
|
int Mod_ReadLump( const char *filename, const int lump, void **lumpdata, int *lumpsize );
|
||||||
|
|
|
@ -421,7 +421,7 @@ static int SV_Multicast( int dest, const vec3_t origin, const edict_t *ent, qboo
|
||||||
case MSG_PAS:
|
case MSG_PAS:
|
||||||
if( origin == NULL ) return false;
|
if( origin == NULL ) return false;
|
||||||
// NOTE: GoldSource not using PHS for singleplayer
|
// NOTE: GoldSource not using PHS for singleplayer
|
||||||
Mod_FatPVS( origin, FATPHS_RADIUS, fatphs, world.fatbytes, false, ( svs.maxclients == 1 ));
|
Mod_FatPVS( origin, FATPHS_RADIUS, fatphs, world.fatbytes, false, ( svs.maxclients == 1 ), true );
|
||||||
mask = fatphs; // using the FatPVS like a PHS
|
mask = fatphs; // using the FatPVS like a PHS
|
||||||
break;
|
break;
|
||||||
case MSG_PVS_R:
|
case MSG_PVS_R:
|
||||||
|
@ -4156,7 +4156,7 @@ void GAME_EXPORT SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word
|
||||||
// setup pvs cluster for invoker
|
// setup pvs cluster for invoker
|
||||||
if( !FBitSet( flags, FEV_GLOBAL ))
|
if( !FBitSet( flags, FEV_GLOBAL ))
|
||||||
{
|
{
|
||||||
Mod_FatPVS( pvspoint, FATPHS_RADIUS, fatphs, world.fatbytes, false, ( svs.maxclients == 1 ));
|
Mod_FatPVS( pvspoint, FATPHS_RADIUS, fatphs, world.fatbytes, false, ( svs.maxclients == 1 ), true );
|
||||||
mask = fatphs; // using the FatPVS like a PHS
|
mask = fatphs; // using the FatPVS like a PHS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4286,7 +4286,7 @@ static byte *GAME_EXPORT pfnSetFatPVS( const float *org )
|
||||||
if( FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
|
if( FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
|
||||||
merge = true;
|
merge = true;
|
||||||
|
|
||||||
Mod_FatPVS( org, FATPVS_RADIUS, fatpvs, world.fatbytes, merge, fullvis );
|
Mod_FatPVS( org, FATPVS_RADIUS, fatpvs, world.fatbytes, merge, fullvis, false );
|
||||||
|
|
||||||
return fatpvs;
|
return fatpvs;
|
||||||
}
|
}
|
||||||
|
@ -4309,7 +4309,7 @@ static byte *GAME_EXPORT pfnSetFatPAS( const float *org )
|
||||||
if( FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
|
if( FBitSet( sv.hostflags, SVF_MERGE_VISIBILITY ))
|
||||||
merge = true;
|
merge = true;
|
||||||
|
|
||||||
Mod_FatPVS( org, FATPHS_RADIUS, fatphs, world.fatbytes, merge, fullvis );
|
Mod_FatPVS( org, FATPHS_RADIUS, fatphs, world.fatbytes, merge, fullvis, true );
|
||||||
|
|
||||||
return fatphs;
|
return fatphs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue