mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-12 05:51:02 +00:00
ref_soft: bmodel dlights (ignore transform)
This commit is contained in:
parent
153b8cbcc3
commit
36a5247181
17
r_main.c
17
r_main.c
@ -1334,6 +1334,7 @@ void R_DrawBEntitiesOnList (void)
|
|||||||
|
|
||||||
for( i = 0; i < tr.draw_list->num_solid_entities && !RI.onlyClientDraw; i++ )
|
for( i = 0; i < tr.draw_list->num_solid_entities && !RI.onlyClientDraw; i++ )
|
||||||
{
|
{
|
||||||
|
int k;
|
||||||
RI.currententity = tr.draw_list->solid_entities[i];
|
RI.currententity = tr.draw_list->solid_entities[i];
|
||||||
RI.currentmodel = RI.currententity->model;
|
RI.currentmodel = RI.currententity->model;
|
||||||
if (!RI.currentmodel)
|
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.currentmodel = tr.draw_list->solid_entities[i]->model;
|
||||||
// RI.currententity = tr.draw_list->solid_entities[i];
|
// RI.currententity = tr.draw_list->solid_entities[i];
|
||||||
RI.currententity->topnode = topnode;
|
RI.currententity->topnode = topnode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user