mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: gl: migrate to new way to get lightstyles and dlights
This commit is contained in:
@@ -1450,7 +1450,7 @@ static void R_StudioDynamicLight( cl_entity_t *ent, alight_t *plight )
|
||||
|
||||
for( lnum = 0; lnum < MAX_DLIGHTS; lnum++ )
|
||||
{
|
||||
dl = gEngfuncs.GetDynamicLight( lnum );
|
||||
dl = &tr.dlights[lnum];
|
||||
|
||||
if( dl->die < g_studio.time || !r_dynamic->value )
|
||||
continue;
|
||||
@@ -1517,7 +1517,6 @@ static void R_StudioEntityLight( alight_t *lightinfo )
|
||||
float lstrength[MAX_LOCALLIGHTS];
|
||||
cl_entity_t *ent = RI.currententity;
|
||||
vec3_t mid, origin, pos;
|
||||
dlight_t *el;
|
||||
|
||||
g_studio.numlocallights = 0;
|
||||
|
||||
@@ -1533,7 +1532,7 @@ static void R_StudioEntityLight( alight_t *lightinfo )
|
||||
|
||||
for( lnum = 0; lnum < MAX_ELIGHTS; lnum++ )
|
||||
{
|
||||
el = gEngfuncs.GetEntityLight( lnum );
|
||||
dlight_t *el = &tr.elights[lnum];
|
||||
|
||||
if( el->die < g_studio.time || el->radius <= 0.0f )
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user