Revision: 2625
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2625&view=rev
Author: ulteq
Date: 2012-05-22 03:15:20 +0000 (Tue, 22 May 2012)
Log Message:
-----------
-Fix: CameraBehaviorStatic no longer skipped when pressing 'c'
Modified Paths:
--------------
trunk/source/main/gfx/camera/CameraManager.cpp
trunk/source/main/gfx/camera/CameraManager.h
Modified: trunk/source/main/gfx/camera/CameraManager.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraManager.cpp 2012-05-22 03:00:24 UTC
(rev 2624)
+++ trunk/source/main/gfx/camera/CameraManager.cpp 2012-05-22 03:15:20 UTC
(rev 2625)
@@ -89,7 +89,7 @@
if ( currentBehaviorID < CAMERA_BEHAVIOR_END &&
INPUTENGINE.getEventBoolValueBounce(EV_CAMERA_CHANGE) )
{
- switchToNextBehavior();
+ switchToNextBehavior(false);
}
if ( INPUTENGINE.getEventBoolValueBounce(EV_CAMERA_FREE_MODE_FIX) )
@@ -127,9 +127,9 @@
}
}
-void CameraManager::switchToNextBehavior()
+void CameraManager::switchToNextBehavior(bool force /* = true */)
{
- if ( !currentBehavior || currentBehavior->switchBehavior(ctx) )
+ if ( !currentBehavior || force || currentBehavior->switchBehavior(ctx) )
{
int i = (currentBehaviorID + 1) % CAMERA_BEHAVIOR_END;
switchBehavior(i);
Modified: trunk/source/main/gfx/camera/CameraManager.h
===================================================================
--- trunk/source/main/gfx/camera/CameraManager.h 2012-05-22 03:00:24 UTC
(rev 2624)
+++ trunk/source/main/gfx/camera/CameraManager.h 2012-05-22 03:15:20 UTC
(rev 2625)
@@ -66,7 +66,7 @@
void update(float dt);
void switchBehavior(int newBehavior, bool reset = true);
- void switchToNextBehavior();
+ void switchToNextBehavior(bool force = true);
void toggleBehavior(int behavior);
bool hasActiveBehavior();
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