ref_soft: bmodel dlights (ignore transform)

This commit is contained in:
mittorn 2019-03-27 21:16:33 +07:00
parent 153b8cbcc3
commit 36a5247181
1 changed files with 17 additions and 0 deletions

View File

@ -1334,6 +1334,7 @@ void R_DrawBEntitiesOnList (void)
for( i = 0; i < tr.draw_list->num_solid_entities && !RI.onlyClientDraw; i++ )
{
int k;
RI.currententity = tr.draw_list->solid_entities[i];
RI.currentmodel = RI.currententity->model;
if (!RI.currentmodel)
@ -1388,6 +1389,22 @@ void R_DrawBEntitiesOnList (void)
}
}*/
// calculate dynamic lighting for bmodel
for( k = 0; k < MAX_DLIGHTS; k++ )
{
dlight_t *l = gEngfuncs.GetDynamicLight( k );
if( l->die < gpGlobals->time || !l->radius )
continue;
/*VectorCopy( l->origin, oldorigin ); // save lightorigin
Matrix4x4_VectorITransform( RI.objectMatrix, l->origin, origin_l );
VectorCopy( origin_l, l->origin ); // move light in bmodel space
R_MarkLights( l, 1<<k, clmodel->nodes + clmodel->hulls[0].firstclipnode );
VectorCopy( oldorigin, l->origin ); // restore lightorigin*/
R_MarkLights( l, 1<<k, RI.currentmodel->nodes + RI.currentmodel->hulls[0].firstclipnode );
}
// RI.currentmodel = tr.draw_list->solid_entities[i]->model;
// RI.currententity = tr.draw_list->solid_entities[i];
RI.currententity->topnode = topnode;