Revision: 2637
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2637&view=rev
Author:   ulteq
Date:     2012-05-23 18:11:07 +0000 (Wed, 23 May 2012)
Log Message:
-----------
style++

Modified Paths:
--------------
    trunk/source/main/physics/Beam.cpp

Modified: trunk/source/main/physics/Beam.cpp
===================================================================
--- trunk/source/main/physics/Beam.cpp  2012-05-23 18:03:39 UTC (rev 2636)
+++ trunk/source/main/physics/Beam.cpp  2012-05-23 18:11:07 UTC (rev 2637)
@@ -478,12 +478,10 @@
        deleting = true;
        state = DELETED;
 
-       // hide all meshes, prevents deleting stuff while drawing
+       // hide everything, prevents deleting stuff while drawing
+       this->setBeamVisibility(false);
        this->setMeshVisibility(false);
 
-       // hide all beams, prevents deleting stuff while drawing
-       this->setBeamVisibility(false);
-
        _waitForSync();
 
        // delete all classes we might have constructed
@@ -4546,11 +4544,14 @@
 
 void Beam::setBeamVisibility(bool visible, bool linked)
 {
-       int i=0;
-       for(i=0;i<free_beam;i++)
+       for (int i=0; i < free_beam; i++)
        {
-               if(beams[i].mSceneNode) 
beams[i].mSceneNode->setVisible(visible);
+               if (beams[i].mSceneNode)
+               {
+                       beams[i].mSceneNode->setVisible(visible);
+               }
        }
+
        beamsVisible = visible;
 
        if (linked)
@@ -4565,27 +4566,35 @@
 
 void Beam::setMeshVisibility(bool visible, bool linked)
 {
-       int i=0;
-       for(i=0;i<free_prop;i++)
+       for (int i=0; i < free_prop; i++)
        {
-               if(props[i].mo) props[i].mo->setVisible(visible);
-               if(props[i].wheel) props[i].wheel->setVisible(visible);
+               if(props[i].mo)                 
props[i].mo->setVisible(visible);
+               if(props[i].wheel)              
props[i].wheel->setVisible(visible);
                if(props[i].bbsnode[0]) 
props[i].bbsnode[0]->setVisible(visible);
                if(props[i].bbsnode[1]) 
props[i].bbsnode[1]->setVisible(visible);
                if(props[i].bbsnode[2]) 
props[i].bbsnode[2]->setVisible(visible);
                if(props[i].bbsnode[3]) 
props[i].bbsnode[3]->setVisible(visible);
        }
-       for(i=0;i<free_flexbody;i++)
+       for (int i=0; i < free_flexbody; i++)
        {
                flexbodies[i]->setVisible(visible);
        }
-       for(i=0;i<free_wheel;i++)
+       for (int i=0; i < free_wheel; i++)
        {
-               if(vwheels[i].cnode) vwheels[i].cnode->setVisible(visible);
-               if(vwheels[i].fm) vwheels[i].fm->setVisible(visible);
+               if (vwheels[i].cnode)
+               {
+                       vwheels[i].cnode->setVisible(visible);
+               }
+               if (vwheels[i].fm)
+               {
+                       vwheels[i].fm->setVisible(visible);
+               }
+       }
+       if (cabMesh)
+       {
+               cabNode->setVisible(visible);
+       }
 
-       }
-       if(cabMesh) cabNode->setVisible(visible);
        meshesVisible = visible;
 
        if (linked)

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