Experimental support for dynamic lights. Doesn't work too well due to our use of a global sun, though could work in a dark track with little sun
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12332 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -1443,6 +1443,21 @@ void Track::loadTrackModel(bool reverse_track, unsigned int mode_id)
|
||||
{
|
||||
Camera::readEndCamera(*node);
|
||||
}
|
||||
else if(name=="light")
|
||||
{
|
||||
core::vector3df pos;
|
||||
node->get("xyz", &pos);
|
||||
|
||||
video::SColor color;
|
||||
node->get("color", &color);
|
||||
|
||||
float distance = 25.0f;
|
||||
node->get("distance", &distance);
|
||||
|
||||
scene::ILightSceneNode* node = irr_driver->getSceneManager()->addLightSceneNode(NULL, pos, color, distance);
|
||||
node->setLightType(video::ELT_POINT);
|
||||
node->enableCastShadow(true);
|
||||
}
|
||||
else if(name=="weather")
|
||||
{
|
||||
std::string weather_particles;
|
||||
|
||||
Reference in New Issue
Block a user