mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: minor refactoring
This commit is contained in:
@@ -40,23 +40,20 @@ qboolean R_CullBox( const vec3_t mins, const vec3_t maxs )
|
||||
R_CullModel
|
||||
=============
|
||||
*/
|
||||
int R_CullModel( cl_entity_t *e, const vec3_t absmin, const vec3_t absmax )
|
||||
qboolean R_CullModel( cl_entity_t *e, const vec3_t absmin, const vec3_t absmax )
|
||||
{
|
||||
if( e == tr.viewent )
|
||||
{
|
||||
if( ENGINE_GET_PARM( PARM_DEV_OVERVIEW ))
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
if( RP_NORMALPASS() && !ENGINE_GET_PARM( PARM_THIRDPERSON ) && CL_IsViewEntityLocalPlayer())
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( R_CullBox( absmin, absmax ))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
return R_CullBox( absmin, absmax );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -328,7 +328,7 @@ qboolean R_BeamCull( const vec3_t start, const vec3_t end, qboolean pvsOnly );
|
||||
//
|
||||
// gl_cull.c
|
||||
//
|
||||
int R_CullModel( cl_entity_t *e, const vec3_t absmin, const vec3_t absmax );
|
||||
qboolean R_CullModel( cl_entity_t *e, const vec3_t absmin, const vec3_t absmax );
|
||||
qboolean R_CullBox( const vec3_t mins, const vec3_t maxs );
|
||||
int R_CullSurface( msurface_t *surf, gl_frustum_t *frustum, uint clipflags );
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ static qboolean R_StudioComputeBBox( vec3_t bbox[8] )
|
||||
return false;
|
||||
|
||||
// check if we have valid mins\maxs
|
||||
if( !VectorCompare( vec3_origin, RI.currentmodel->mins ))
|
||||
if( !VectorIsNull( RI.currentmodel->mins ) && !VectorIsNull( RI.currentmodel->maxs ))
|
||||
{
|
||||
// clipping bounding box
|
||||
VectorCopy( RI.currentmodel->mins, mins );
|
||||
|
||||
@@ -211,7 +211,7 @@ static qboolean R_StudioComputeBBox( vec3_t bbox[8] )
|
||||
return false;
|
||||
|
||||
// check if we have valid mins\maxs
|
||||
if( !VectorCompare( vec3_origin, RI.currentmodel->mins ))
|
||||
if( !VectorIsNull( RI.currentmodel->mins ) && !VectorIsNull( RI.currentmodel->maxs ))
|
||||
{
|
||||
// clipping bounding box
|
||||
VectorCopy( RI.currentmodel->mins, mins );
|
||||
|
||||
Reference in New Issue
Block a user