Revision: 2602
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2602&view=rev
Author:   ulteq
Date:     2012-05-19 21:28:59 +0000 (Sat, 19 May 2012)
Log Message:
-----------
-Codechange: CameraSystem WIP (nearly done)
CameraBehaviorCharacter now remembering last mode
simplified code related to the automatic behavior switching

Modified Paths:
--------------
    trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp
    trunk/source/main/gfx/camera/CameraManager.cpp

Modified: trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp    2012-05-19 
19:25:50 UTC (rev 2601)
+++ trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp    2012-05-19 
21:28:59 UTC (rev 2602)
@@ -71,7 +71,6 @@
                CameraManager::getSingleton().switchToNextBehavior();
        } else if ( reset )
        {
-               camMode = CHARACTER_THIRD_PERSON;
                this->reset(ctx);
        }
 }
@@ -102,5 +101,6 @@
                reset(ctx);
                return false;
        }
+       camMode = 0;
        return true;
 }

Modified: trunk/source/main/gfx/camera/CameraManager.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraManager.cpp      2012-05-19 19:25:50 UTC 
(rev 2601)
+++ trunk/source/main/gfx/camera/CameraManager.cpp      2012-05-19 21:28:59 UTC 
(rev 2602)
@@ -167,12 +167,9 @@
        if ( !ctx.mCurrTruck && 
dynamic_cast<CameraBehaviorVehicle*>(currentBehavior) )
        {
                switchBehavior(CAMERA_BEHAVIOR_CHARACTER);
-       } else if ( ctx.mCurrTruck && 
!dynamic_cast<CameraBehaviorVehicle*>(currentBehavior) )
+       } else if ( ctx.mCurrTruck && 
dynamic_cast<CameraBehaviorCharacter*>(currentBehavior) )
        {
-               if ( currentBehaviorID != CAMERA_BEHAVIOR_STATIC && 
currentBehaviorID < CAMERA_BEHAVIOR_END )
-               {
-                       switchBehavior(CAMERA_BEHAVIOR_VEHICLE);
-               }
+               switchBehavior(CAMERA_BEHAVIOR_VEHICLE);
        }
 
        if ( currentBehavior )

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to