Revision: 1443
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1443&view=rev
Author: rorthomas
Date: 2010-07-13 22:29:56 +0000 (Tue, 13 Jul 2010)
Log Message:
-----------
fixed mainlight request when using new terrain mode
Modified Paths:
--------------
trunk/source/main/RoRFrameListener.cpp
Modified: trunk/source/main/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/RoRFrameListener.cpp 2010-07-13 21:56:14 UTC (rev
1442)
+++ trunk/source/main/RoRFrameListener.cpp 2010-07-13 22:29:56 UTC (rev
1443)
@@ -4822,14 +4822,26 @@
// fogstart =
StringConverter::parseLong(SETTINGS.getSetting("Sandstorm Fog Start"));
// Create a light
- Light* l = mSceneMgr->createLight("MainLight");
- //directional light for shadow
- l->setType(Light::LT_DIRECTIONAL);
- l->setDirection(0.785, -0.423, 0.453);
+ Light* l = 0;
- l->setDiffuseColour(fadeColour);
- l->setSpecularColour(fadeColour);
+#ifdef USE_CAELUM
+ if(!useCaelum)
+ l = mSceneMgr->getLight("MainLight");
+ else
+ l = SkyManager::getSingleton().getMainLight();
+#else // USE_CAELUM
+ l = mSceneMgr->getLight("MainLight");
+#endif // USE_CAELUM
+ if(l)
+ {
+ //directional light for shadow
+ l->setType(Light::LT_DIRECTIONAL);
+ l->setDirection(0.785, -0.423, 0.453);
+ l->setDiffuseColour(fadeColour);
+ l->setSpecularColour(fadeColour);
+ }
+
mCamera->setFarClipDistance( farclip*1.733 );
// Fog
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel