Skip to content

Commit 54961f0

Browse files
committed
client: add a check for qbsp2 extensions
1 parent 45ba3f1 commit 54961f0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

source_code/cl_dll/cl_util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,5 @@ void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] );
187187
void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt );
188188
void AngleQuaternion( float *angles, vec4_t quaternion );
189189

190-
struct mleaf_s *Mod_PointInLeaf( Vector p, struct mnode_s *node );
190+
struct mleaf_s *Mod_PointInLeaf( Vector p, struct mnode_s *node, struct model_s *mod );
191191
bool IsXashFWGS();

source_code/cl_dll/util.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,13 @@ Mod_PointInLeaf
418418
419419
==================
420420
*/
421-
mleaf_t *Mod_PointInLeaf( Vector p, mnode_t *node )
421+
mleaf_t *Mod_PointInLeaf( Vector p, mnode_t *node, model_t *mod )
422422
{
423423
while( 1 )
424424
{
425425
if( node->contents < 0 )
426426
return (mleaf_t *)node;
427-
node = node->children[PlaneDiff( p, node->plane ) < 0];
427+
node = node_child( node, PlaneDiff( p, node->plane ) < 0, mod );
428428
}
429429

430430
// never reached

source_code/cl_dll/view.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ void V_UpdatePalette (struct ref_params_s *pparams)
480480
// set contents color
481481
if (world != NULL && world->model != NULL)
482482
{
483-
mleaf_t *viewleaf = Mod_PointInLeaf( pparams->vieworg, world->model->nodes );
483+
mleaf_t *viewleaf = Mod_PointInLeaf( pparams->vieworg, world->model->nodes, world->model );
484484

485485
if (viewleaf != NULL)
486486
V_SetContentsColor (viewleaf->contents);

0 commit comments

Comments
 (0)