Browse Source

ref_soft: light: fixed game crash in Customize multiplayer menu

pull/2/head
Alibek Omarov 3 years ago
parent
commit
92cfa2af48
  1. 6
      ref_soft/r_light.c

6
ref_soft/r_light.c

@ -156,7 +156,8 @@ void R_PushDlights( void )
tr.dlightframecount = tr.framecount; tr.dlightframecount = tr.framecount;
RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); RI.currententity = gEngfuncs.GetEntityByIndex( 0 );
RI.currentmodel = RI.currententity->model; if( RI.currententity )
RI.currentmodel = RI.currententity->model;
for( i = 0; i < MAX_DLIGHTS; i++, l++ ) for( i = 0; i < MAX_DLIGHTS; i++, l++ )
{ {
@ -168,7 +169,8 @@ void R_PushDlights( void )
//if( GL_FrustumCullSphere( &RI.frustum, l->origin, l->radius, 15 )) //if( GL_FrustumCullSphere( &RI.frustum, l->origin, l->radius, 15 ))
//continue; //continue;
R_MarkLights( l, 1<<i, RI.currentmodel->nodes ); if( RI.currententity )
R_MarkLights( l, 1<<i, RI.currentmodel->nodes );
} }
} }

Loading…
Cancel
Save