Revision: 1744
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1744&view=rev
Author:   rorthomas
Date:     2011-03-08 10:35:15 +0000 (Tue, 08 Mar 2011)

Log Message:
-----------
fixes #648

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

Modified: trunk/source/main/gfx/vidcam.cpp
===================================================================
--- trunk/source/main/gfx/vidcam.cpp    2011-03-07 23:45:42 UTC (rev 1743)
+++ trunk/source/main/gfx/vidcam.cpp    2011-03-08 10:35:15 UTC (rev 1744)
@@ -211,8 +211,11 @@
                LOG("Error parsing File (videocamera) " + (fname) +" line " + 
TOSTRING(linecounter) + ". unkown material: '"+materialname+"', trying to 
continue ...");
                return 0;
        }
-       
 
+       // clone the material to stay unique
+       MaterialPtr matNew = mat->clone(String(truck->truckname) + 
materialname);
+       String newMaterialName = matNew->getName();
+
        VideoCamera *v  = new VideoCamera(mSceneMgr, camera, truck);
        v->fov          = fov;
        v->minclip      = minclip;
@@ -222,7 +225,7 @@
        v->nref         = nref;
        v->offset       = Vector3(offx, offy, offz);
        v->switchoff    = cmode;            // add performance switch off  
->meeds fix, only "always on" supported yet
-       v->materialName = String(materialname);
+       v->materialName = newMaterialName;
        v->textureSize  = Vector2(texx, texy);
 
        if(crole != 1)                     //rotate camera picture 180\xB0, 
skip for mirrors


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

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to