Revision: 2474
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2474&view=rev
Author:   rorthomas
Date:     2012-03-16 13:02:35 +0000 (Fri, 16 Mar 2012)
Log Message:
-----------
hideinChooser added, fixednode debug

Modified Paths:
--------------
    trunk/source/main/gfx/camera/CameraBehaviorVehicleSpline.cpp
    trunk/source/main/gui/gui_menu.cpp
    trunk/source/main/physics/Beam.cpp
    trunk/source/main/physics/BeamData.h
    trunk/source/main/physics/input_output/SerializedRig.cpp

Modified: trunk/source/main/gfx/camera/CameraBehaviorVehicleSpline.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorVehicleSpline.cpp        
2012-03-16 11:26:47 UTC (rev 2473)
+++ trunk/source/main/gfx/camera/CameraBehaviorVehicleSpline.cpp        
2012-03-16 13:02:35 UTC (rev 2474)
@@ -62,7 +62,6 @@
        {
                float pos1d = i/(float)splineDrawResolution;
                Vector3 pos3d = spline->interpolate(pos1d);
-               //printf(">pos3d> %d >%f,%f,%f\n", i, pos3d.x, pos3d.y, 
pos3d.z);
                myManualObject->position(pos3d);
 
        }
@@ -104,31 +103,17 @@
 {
        const OIS::MouseState ms = _arg.state;
        Camera *cam = CameraManager::getSingleton().getCamera();
-       if(ms.buttonDown(OIS::MB_Right))
-       {
-               if(ms.X.rel < 0)
-               {
-                       // move left
-                       splinePos += (float)ms.X.rel * 0.0005f;
-                       if(splinePos < 0)
-                       {
-                               splinePos = 0;
-                               // rotate instead
-                               camRotX += Degree( (float)ms.X.rel * 0.13f);
-                       }
-                       if(splinePos > 1) splinePos = 1;
-               } else if(ms.X.rel > 0)
-               {
-                       // move right
-                       splinePos += (float)ms.X.rel * 0.0005f;
-                       if(splinePos > 1)
-                       {
-                               splinePos = 1;
-                               // rotate instead
-                               camRotX += Degree( (float)ms.X.rel * 0.13f);
-                       }
-               }
 
+       if(INPUTENGINE.isKeyDown(OIS::KC_LCONTROL) && 
ms.buttonDown(OIS::MB_Right))
+       {
+               splinePos += (float)ms.X.rel * 0.001f;
+               if(splinePos < 0) splinePos = 0;
+               if(splinePos > 1) splinePos = 1;
+               return true;
+       }
+       else if(ms.buttonDown(OIS::MB_Right))
+       {
+               camRotX += Degree( (float)ms.X.rel * 0.13f);
                camRotY += Degree(-(float)ms.Y.rel * 0.13f);
                camDist += -(float)ms.Z.rel * 0.02f;
                return true;

Modified: trunk/source/main/gui/gui_menu.cpp
===================================================================
--- trunk/source/main/gui/gui_menu.cpp  2012-03-16 11:26:47 UTC (rev 2473)
+++ trunk/source/main/gui/gui_menu.cpp  2012-03-16 13:02:35 UTC (rev 2474)
@@ -245,6 +245,8 @@
                {
                        if(!trucks[i]) continue;
 
+                       if(trucks[i]->hideInChooser) continue;
+
                        char tmp[255] = {};
                        sprintf(tmp, "[%d] %s", i, 
trucks[i]->realtruckname.c_str());
 

Modified: trunk/source/main/physics/Beam.cpp
===================================================================
--- trunk/source/main/physics/Beam.cpp  2012-03-16 11:26:47 UTC (rev 2473)
+++ trunk/source/main/physics/Beam.cpp  2012-03-16 13:02:35 UTC (rev 2474)
@@ -446,6 +446,7 @@
        smokeNode=NULL;
        smoker=NULL;
        brake=0.0;
+       hideInChooser=false;
        abs_timer=0.0;
        abs_state=false;
        blinktreshpassed=false;
@@ -4946,14 +4947,14 @@
                        t.txt->setTextAlignment(MovableText::H_LEFT, 
MovableText::V_BELOW);
                        //t.txt->setAdditionalHeight(0);
                        t.txt->showOnTop(true);
-                       t.txt->setCharacterHeight(0.5);
-                       t.txt->setColor(ColourValue::Black);
+                       t.txt->setCharacterHeight(0.2f);
+                       t.txt->setColor(ColourValue::White);
                        t.txt->setRenderingDistance(2);
 
                        t.node = parentNode->createChildSceneNode();
                        t.node->attachObject(t.txt);
                        t.node->setPosition(nodes[i].smoothpos);
-                       t.node->setScale(Vector3(0.1,0.1,0.1));
+                       //t.node->setScale(Vector3(0.1,0.1,0.1));
 
                        // collision nodes debug, also mimics as node visual
                        SceneNode *s = t.node->createChildSceneNode();

Modified: trunk/source/main/physics/BeamData.h
===================================================================
--- trunk/source/main/physics/BeamData.h        2012-03-16 11:26:47 UTC (rev 
2473)
+++ trunk/source/main/physics/BeamData.h        2012-03-16 13:02:35 UTC (rev 
2474)
@@ -858,6 +858,8 @@
        int cameraRail[MAX_CAMERARAIL];
        int free_camerarail;
 
+       bool hideInChooser;
+
        char guid[128];
        int hasfixes;
        int wingstart;

Modified: trunk/source/main/physics/input_output/SerializedRig.cpp
===================================================================
--- trunk/source/main/physics/input_output/SerializedRig.cpp    2012-03-16 
11:26:47 UTC (rev 2473)
+++ trunk/source/main/physics/input_output/SerializedRig.cpp    2012-03-16 
13:02:35 UTC (rev 2474)
@@ -880,6 +880,13 @@
                                continue;
                        }
 
+                       if (c.line == "hideInChooser")
+                       {
+                               hideInChooser = true;
+                               continue;
+                       }
+
+
                        if (c.line == "lockgroup_default_nolock")
                        {
                                lockgroup_default = 9999;

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


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to