[Orxonox-commit 7137] r11754 - code/branches/Presentation_HS17_merge/src/modules/flappyorx

landauf at orxonox.net landauf at orxonox.net
Thu Feb 15 23:42:36 CET 2018


Author: landauf
Date: 2018-02-15 23:42:36 +0100 (Thu, 15 Feb 2018)
New Revision: 11754

Modified:
   code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc
   code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc
Log:
[FlappyOrx_HS17] fixed build (Highscopre API has changed; usleep is not defined and sleeping 1ms is probably not needed anyway)

Modified: code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc	2018-02-15 22:36:40 UTC (rev 11753)
+++ code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrx.cc	2018-02-15 22:42:36 UTC (rev 11754)
@@ -261,10 +261,10 @@
         else                sDeathMessage = DeathMessageover30[rand()%(DeathMessageover30.size())];
         
         //Update Highscore
-        if (Highscore::exists()){
-                    int score = this->getPoints();
-                    if(score > Highscore::getInstance().getHighestScoreOfGame("Flappy Orx")) 
-                        Highscore::getInstance().storeHighscore("Flappy Orx",score);
+        if (Highscore::exists())
+        {
+            int score = this->getPoints();
+            Highscore::getInstance().storeScore("Flappy Orx", score, this->getPlayer()->getPlayer());
         }
 
         //Delete all Tubes and asteroids
@@ -280,12 +280,6 @@
 
     void FlappyOrx::end()
     {
-        if (Highscore::exists()){
-                    int score = this->getPoints();
-                    if(score > Highscore::getInstance().getHighestScoreOfGame("Orxonox Arcade")) 
-                        Highscore::getInstance().storeHighscore("Orxonox Arcade",score);
-
-          }
         GSLevel::startMainMenu();
     }
 }

Modified: code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc	2018-02-15 22:36:40 UTC (rev 11753)
+++ code/branches/Presentation_HS17_merge/src/modules/flappyorx/FlappyOrxShip.cc	2018-02-15 22:42:36 UTC (rev 11754)
@@ -175,6 +175,5 @@
         pos.y = 0;
         velocity.y = 0;
         setPosition(pos);
-        usleep(1000u);
     }
 }



More information about the Orxonox-commit mailing list