The problem is that the dynamic light doesn't light brush entities, but it lights only model entities.
The code where the lighting is:
- Code: Select all
int C_FireBall::DrawModel( int flags )
{
if ( gpGlobals->frametime > 0.0f && !m_bUpdated)
{
m_bUpdated = true;
m_vecLastOrigin = GetAbsOrigin();
}
pEffect->StartEmission();
pEffect->StartRender(VMatrix(Vector(0,0,0),Vector(0,0,0),Vector(0,0,0)));//x,y,z
if ( m_bLight )
{
dlight_t *dl = effects->CL_AllocDlight( index );
dl->origin = m_vecLastOrigin // moving orgin;
dl->radius = fire_lightradius.GetInt()//it's 2000;
dl->decay = dl->radius / 0.05f;
dl->color.r = 255;
dl->color.g = 192;
dl->color.b = 64;
dlight_t *el= effects->CL_AllocElight( index );
el->origin = m_vecLastOrigin;
el->color.r = 255;
el->color.r = 255;
el->color.g = 192;
el->color.b = 64;
el->radius = fire_lightradius.GetInt();
}
return 1;
}
Please help me.




