Revision: 2604
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2604&view=rev
Author:   ulteq
Date:     2012-05-19 23:02:13 +0000 (Sat, 19 May 2012)
Log Message:
-----------
-Bugfix: Environment Map (envmap)
fixes the non dynamic envmap
might also fix the recent caelum bug

Modified Paths:
--------------
    trunk/source/main/gameplay/RoRFrameListener.cpp

Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-19 23:00:56 UTC 
(rev 2603)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-19 23:02:13 UTC 
(rev 2604)
@@ -5431,9 +5431,21 @@
        Beam *curr_truck = BeamFactory::getSingleton().getCurrentTruck();
 
        // environment map
-       if (envmap && curr_truck)
+       if (envmap)
        {
-               envmap->update(curr_truck->getPosition(), curr_truck);
+               if (curr_truck)
+               {
+                       envmap->update(curr_truck->getPosition(), curr_truck);
+#ifdef USE_CAELUM
+                       if (SkyManager::singletonExists())
+                       {
+                               
SkyManager::getSingleton().notifyCameraChanged(mCamera);
+                       }
+#endif // USE_CAELUM
+               } else
+               {
+                       envmap->update(Vector3(terrainxsize/2.0, 
hfinder->getHeightAt(terrainxsize/2.0, terrainzsize/2.0)+50.0, 
terrainzsize/2.0));
+               }
        }
 
        // water

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to