prettify modern flashlight addition to cl_tent

This commit is contained in:
Ivan Avdeev 2021-12-29 19:05:40 -08:00 committed by NightFox
parent 1501f7fea4
commit cf09305f79
1 changed files with 4 additions and 15 deletions

View File

@ -2696,26 +2696,15 @@ void CL_AddEntityEffects( cl_entity_t *ent )
if( FBitSet( ent->curstate.effects, EF_BRIGHTFIELD ))
R_EntityParticles( ent );
if (REF_GET_PARM( PARM_MODERNFLASHLIGHT, 1 ) == true)
if ( FBitSet( ent->curstate.effects, EF_DIMLIGHT ))
{
if( !ent->player )
if ( ent->player && !Host_IsQuakeCompatible( ))
{
if ( FBitSet( ent->curstate.effects, EF_DIMLIGHT ) )
if ( !REF_GET_PARM( PARM_MODERNFLASHLIGHT, 1))
{
dlight_t *dl = CL_AllocDlight( ent->index );
dl->color.r = dl->color.g = dl->color.b = 100;
dl->radius = COM_RandomFloat( 200, 231 );
VectorCopy( ent->origin, dl->origin );
dl->die = cl.time + 0.001;
CL_UpdateFlashlight( ent );
}
}
}
else if ( FBitSet( ent->curstate.effects, EF_DIMLIGHT ))
{
if( ent->player && !Host_IsQuakeCompatible( ))
{
CL_UpdateFlashlight( ent );
}
else
{
dlight_t *dl = CL_AllocDlight( ent->index );