Changeset 11716 for code/trunk/src/orxonox/Highscore.cc
- Timestamp:
- Jan 7, 2018, 9:48:58 PM (7 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.