void map::apply_character_light( const player &p ) { float const held_luminance = p.active_light(); if( held_luminance > LIGHT_AMBIENT_LOW ) { apply_light_source( p.posx(), p.posy(), held_luminance, trigdist ); } }
void map::apply_character_light( player &p ) { if( p.has_effect( effect_onfire ) ) { apply_light_source( p.pos(), 8 ); } else if( p.has_effect( effect_haslight ) ) { apply_light_source( p.pos(), 4 ); } float const held_luminance = p.active_light(); if( held_luminance > LIGHT_AMBIENT_LOW ) { apply_light_source( p.pos(), held_luminance ); } if( held_luminance >= 4 && held_luminance > ambient_light_at( p.pos() ) - 0.5f ) { p.add_effect( effect_haslight, 1 ); } }