Changeset 11716 for code/trunk/src/orxonox
- Timestamp:
- Jan 7, 2018, 9:48:58 PM (7 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/Highscore.cc
r11715 r11716 50 50 51 51 /** 52 * @brief stores a new highscore in the orxonox.ini file 52 * @brief stores a new highscore in the orxonox.ini file if the new score is better than the highest score so far. 53 53 */ 54 void Highscore::storeHighscore(const std::string& level, int points, PlayerInfo* player){ 55 ModifyConfigValue(highscores_, add, player->getName() + "./." + level + "./." + multi_cast<std::string>(points)); 54 void Highscore::storeScore(const std::string& level, int points, PlayerInfo* player){ 55 if (points > this->getHighestScoreOfGame(level)) { 56 ModifyConfigValue(highscores_, add, player->getName() + "./." + level + "./." + multi_cast<std::string>(points)); 57 } 56 58 } 57 59 } -
code/trunk/src/orxonox/Highscore.h
r11715 r11716 18 18 void setConfigValues(); // Inherited function 19 19 20 void store Highscore(const std::string& level, int points, PlayerInfo* player);20 void storeScore(const std::string& level, int points, PlayerInfo* player); 21 21 int getHighestScoreOfGame(const std::string& game); 22 22
Note: See TracChangeset
for help on using the changeset viewer.