dLights problem.
Hi, i am trying to do dlights right now but it seems to not work.
I am calling it in PaintTraverse. i tried dlight_debug and it work fine but when i call the dlights it doesnt work and the dlight_debug will break (doesnt work). Ideas?
Code:
void DynamicLights(CPlayer* pEntity)
{
dlight_t* dLight = Interfaces.gEffects->CL_AllocDlight(pEntity->GetIndex());
dLight->color = Color(255, 0, 0, 255);
dLight->radius = 400.f;
dLight->key = pEntity->GetIndex();
dLight->m_Direction = pEntity->GetAbsOrigin();
dLight->origin = pEntity->GetAbsOrigin();
dLight->die = Interfaces.Globals->curtime + 1.f;
dLight->decay = 20;
}
