[Orxonox-commit 1647] r6365 - code/branches/presentation2/src/orxonox/controllers

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Dec 16 21:43:36 CET 2009


Author: rgrieder
Date: 2009-12-16 21:43:36 +0100 (Wed, 16 Dec 2009)
New Revision: 6365

Modified:
   code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
Log:
Fixed segfault (when hitting tab in main menu) and second mode problem in NewHumanController.
The mode fix is temporary because it triggers another minor bug with the game pad.

Modified: code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc	2009-12-16 20:42:16 UTC (rev 6364)
+++ code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc	2009-12-16 20:43:36 UTC (rev 6365)
@@ -257,8 +257,9 @@
         }
 
         // Reset pitch and yaw rates
-        this->currentPitch_ = 0;
-        this->currentYaw_ = 0;
+        // TODO: Reactivate this to fix the game pad problem with 0 input
+        //this->currentPitch_ = 0;
+        //this->currentYaw_ = 0;
 
         HumanController::tick(dt);
     }
@@ -479,13 +480,16 @@
 
     void NewHumanController::changeMode()
     {
-        if (NewHumanController::localController_s && NewHumanController::localController_s->controlMode_ == 0)
+        if (NewHumanController::localController_s)
         {
+            if (NewHumanController::localController_s->controlMode_ == 0)
+            {
                 NewHumanController::localController_s->controlMode_ = 1;
                 NewHumanController::localController_s->hideArrows();
+            }
+            else
+                NewHumanController::localController_s->controlMode_ = 0;
         }
-        else
-            NewHumanController::localController_s->controlMode_ = 0;
     }
 
     void NewHumanController::changedControllableEntity()




More information about the Orxonox-commit mailing list