Revision: 1707
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1707&view=rev
Author:   rorthomas
Date:     2011-02-28 00:28:20 +0000 (Mon, 28 Feb 2011)

Log Message:
-----------
fixed videocamera iteration

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

Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp     2011-02-28 00:14:19 UTC 
(rev 1706)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp     2011-02-28 00:28:20 UTC 
(rev 1707)
@@ -4581,6 +4581,7 @@
                }
    
                mReferenceObject->end();
+               mReferenceObject->setCastShadows(false);
                mSceneMgr->getRootSceneNode()->attachObject(mReferenceObject);
        }
 
@@ -6931,11 +6932,9 @@
        if(current_truck == -1 || !trucks[current_truck]) return false;
 
        Beam *t = trucks[current_truck];
-       for(int i=0;i=t->vidcams.size(); i++)
+       for(std::vector<VideoCamera *>::iterator it=t->vidcams.begin(); 
it!=t->vidcams.end(); it++)
        {
-               VideoCamera *v = t->vidcams[i];
-               if(!v) continue;
-               v->update();
+               (*it)->update(dt);
        }
 #if 0
        //mirror

Modified: trunk/source/main/gfx/vidcam.cpp
===================================================================
--- trunk/source/main/gfx/vidcam.cpp    2011-02-28 00:14:19 UTC (rev 1706)
+++ trunk/source/main/gfx/vidcam.cpp    2011-02-28 00:28:20 UTC (rev 1707)
@@ -73,7 +73,7 @@
                
mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(disabledTexture);
 }
 
-void VideoCamera::update()
+void VideoCamera::update(float dt)
 {
        // get the normal of the camera plane now
        Vector3 normal=(truck->nodes[nx].smoothpos - 
truck->nodes[nref].smoothpos).crossProduct(truck->nodes[ny].smoothpos - 
truck->nodes[nref].smoothpos);

Modified: trunk/source/main/gfx/vidcam.h
===================================================================
--- trunk/source/main/gfx/vidcam.h      2011-02-28 00:14:19 UTC (rev 1706)
+++ trunk/source/main/gfx/vidcam.h      2011-02-28 00:28:20 UTC (rev 1707)
@@ -33,7 +33,7 @@
 
        void init();
 
-       void update();
+       void update(float dt);
 
        void setActive(bool state);
        


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

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to