mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: when entity model is NULL, the entity is player and we're drawing in menu, skip this entity silently
The menu relies on the fact that model is set from player's userinfo, and if it has bogus model, it will trip on the nullptr model assert
This commit is contained in:
@@ -805,6 +805,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
RI.currententity = tr.draw_list->solid_entities[i];
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
@@ -837,6 +840,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
RI.currententity = tr.draw_list->solid_entities[i];
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
@@ -875,6 +881,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
|
||||
if( tr.blend <= 0.0f ) continue;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
|
||||
@@ -517,6 +517,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
// d_aflatcolor += 500;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
@@ -544,6 +547,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
RI.currententity = tr.draw_list->solid_entities[i];
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
@@ -579,6 +585,9 @@ static void R_DrawEntitiesOnList( void )
|
||||
if( tr.blend <= 0.0f )
|
||||
continue;
|
||||
|
||||
if( !RI.currentmodel && RI.currententity->player && !FBitSet( RI.rvp.flags, RF_DRAW_WORLD ))
|
||||
continue;
|
||||
|
||||
Assert( RI.currententity != NULL );
|
||||
Assert( RI.currentmodel != NULL );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user