diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 094d52d79..48ad91ad9 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -2196,9 +2196,11 @@ scene::ISceneNode *IrrDriver::addLight(const core::vector3df &pos, } else { - return m_scene_manager + scene::ILightSceneNode* light = m_scene_manager ->addLightSceneNode(m_scene_manager->getRootSceneNode(), pos, video::SColorf(1.0f, r, g, b)); + light->setRadius(radius); + return light; } } // addLight diff --git a/src/karts/kart_gfx.cpp b/src/karts/kart_gfx.cpp index 4bbe5fde0..e7251593a 100644 --- a/src/karts/kart_gfx.cpp +++ b/src/karts/kart_gfx.cpp @@ -53,7 +53,8 @@ KartGFX::KartGFX(const AbstractKart *kart) // Create nitro light core::vector3df location(0.0f, 0.5f, -0.5f*length - 0.05f); m_nitro_light = irr_driver->addLight(location, /*force*/ 0.4f, - /*radius*/5.0f, 0.0f, 0.4f, 1.0f, + /*radius*/CVS->isGLSL() ? 5.0f : 1.0f, + 0.0f, 0.4f, 1.0f, false, node); m_nitro_light->setVisible(false); #ifdef DEBUG @@ -65,7 +66,8 @@ KartGFX::KartGFX(const AbstractKart *kart) // For the first skidding level m_skidding_light_1 = irr_driver->addLight(core::vector3df(0.0f, 0.1f, -0.5f*length - 0.05f), - /* force */ 0.3f, /* radius */ 3.0f, + /* force */ 0.3f, + /*radius*/CVS->isGLSL() ? 3.0f : 1.0f, 1.0f, 0.6f, 0.0f, false, node); m_skidding_light_1->setVisible(false); m_skidding_light_1->setName( ("skidding emitter 1 (" + m_kart->getIdent() @@ -74,7 +76,8 @@ KartGFX::KartGFX(const AbstractKart *kart) // For the second skidding level m_skidding_light_2 = irr_driver->addLight(core::vector3df(0.0f, 0.1f, -0.5f*length - 0.05f), - /* force */0.4f, /*radius*/ 4.0f, + /* force */0.4f, + /*radius*/CVS->isGLSL() ? 4.0f : 1.0f, 1.0f, 0.0f, 0.0f, false, node); m_skidding_light_2->setVisible(false); m_skidding_light_2->setName( ("skidding emitter 2 (" + m_kart->getIdent()