[Orxonox-commit 7142] r11759 - code/branches/Presentation_HS17_merge/src/modules/flappyorx

landauf at orxonox.net landauf at orxonox.net
Sat Feb 17 23:43:13 CET 2018


Author: landauf
Date: 2018-02-17 23:43:12 +0100 (Sat, 17 Feb 2018)
New Revision: 11759

Modified:
   code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc
   code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxHUDinfo.cc
   code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc
Log:
[FlappyOrx_HS17] initialize all variables

Modified: code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc	2018-02-17 22:36:30 UTC (rev 11758)
+++ code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc	2018-02-17 22:43:12 UTC (rev 11759)
@@ -65,8 +65,12 @@
         bIsDead = true;
         firstGame = true;                   //needed for the HUD
 
-        tubeDistance=200.0f;                  //distance between tubes
-        tubeOffsetX=500.0f;                    //tube offset (so that we can't see them spawn)
+        speedBase = 0;
+        speedIncrease = 0;
+        tubeDistanceBase = 0;
+        tubeDistanceIncrease = 0;
+        tubeDistance = 200.0f;                  //distance between tubes
+        tubeOffsetX = 500.0f;                    //tube offset (so that we can't see them spawn)
 
         circlesUsed=0;
         setHUDTemplate("FlappyOrxHUD");

Modified: code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxHUDinfo.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxHUDinfo.cc	2018-02-17 22:36:30 UTC (rev 11758)
+++ code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxHUDinfo.cc	2018-02-17 22:43:12 UTC (rev 11759)
@@ -45,6 +45,7 @@
         this->FlappyOrxGame = nullptr;
         this->bShowPoints_ = false;
         this->bShowGameOver_ = false;
+        this->messageID = 0;
     }
 
     void FlappyOrxHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)

Modified: code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc	2018-02-17 22:36:30 UTC (rev 11758)
+++ code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc	2018-02-17 22:43:12 UTC (rev 11759)
@@ -48,12 +48,14 @@
     {
         RegisterObject(FlappyOrxShip);
 
-        
+        isFlapping = false;
         isDead = true;
-        deathTime = 0;
-
+        speed = 0;
+        upwardThrust = 0;
+        gravity = 0;
         particleLifespan = 0.1;
         particleAge = 0;
+        deathTime = 0;
 
         particlespawner_ = NULL;
         



More information about the Orxonox-commit mailing list