diff --git a/plugins/entity/colour.h b/plugins/entity/colour.h index 8b52ad5e..01a359a1 100644 --- a/plugins/entity/colour.h +++ b/plugins/entity/colour.h @@ -78,7 +78,7 @@ public: Colour( const Callback& colourChanged ) : m_colourChanged( colourChanged ){ default_colour( m_colour ); - m_colour_add = m_colour / 4; + m_colour_add = m_colour / 8; capture_state(); } ~Colour(){ @@ -88,7 +88,7 @@ public: void colourChanged( const char* value ){ release_state(); read_colour_normalized( m_colour, value ); - m_colour_add = m_colour / 4; + m_colour_add = m_colour / 8; capture_state(); m_colourChanged(); diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index c0bea514..cc1d8639 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -321,9 +321,11 @@ void sphere_draw_fill( const Vector3& origin, float radius, const Vector3 radiiP #endif void light_draw_radius_fill( const Vector3& origin, const std::array& envelope, const Vector3 radiiPoints[SPHERE_FILL_POINTS] ){ +#ifdef RADII_RENDER_BIG_RADIUS if ( envelope[0] > 0 ) { sphere_draw_fill( origin, envelope[0], radiiPoints ); } +#endif if ( envelope[1] > 0 ) { sphere_draw_fill( origin, envelope[1], radiiPoints ); } @@ -468,9 +470,11 @@ void sphere_draw_wire( const Vector3& origin, float radius, const Vector3 radiiP } void light_draw_radius_wire( const Vector3& origin, const std::array& envelope, const Vector3 radiiPoints[SPHERE_WIRE_POINTS] ){ +#ifdef RADII_RENDER_BIG_RADIUS if ( envelope[0] > 0 ) { sphere_draw_wire( origin, envelope[0], radiiPoints ); } +#endif if ( envelope[1] > 0 ) { sphere_draw_wire( origin, envelope[1], radiiPoints ); } @@ -821,24 +825,26 @@ public: if ( spawnflags_linear( m_flags ) ) { r[0] = radius + 47.0f / m_fade; - if( r[0] <= 1.f ){ // prevent transform to negative + if( r[0] < 1.f ){ // prevent transform to <=0, as we use r[0] to calculate intensity r[0] = 1.f; r[1] = r[2] = 1.f - 47.0f / m_fade; // this is called once again after minimizing already minimal radii, so calculate correct r[1] - return; } - r[1] = radius; - r[2] = radius - 207.0f / m_fade;; + else{ + r[1] = radius; + r[2] = radius - 207.0f / m_fade;; + } } else { r[0] = radius * sqrt( 48.f ); - if( r[0] <= 1.f ){ + if( r[0] < 1.f ){ r[0] = 1.f; r[1] = r[2] = 0; - return; } - r[1] = radius; - r[2] = r[0] / sqrt( 255.f ); + else{ + r[1] = radius; + r[2] = r[0] / sqrt( 255.f ); + } } // globalOutputStream() << r[0] << " " << r[1] << " " << r[2] << " m_radii_transformed\n"; }