Changeset 7147
- Timestamp:
- Jun 12, 2010, 12:39:14 PM (14 years ago)
- Location:
- code/branches/presentation3/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/MoodManager.cc
r7127 r7147 46 46 this->setConfigValues(); 47 47 48 // Need to use a variable to store old data because ResetConfigValues() doesn't seem to work. 49 oldMood_ = MoodManager::defaultMood_; 50 48 51 // Checking for the existence of the folder for the default mood 49 /* Note: Currently Resource::exists(path) will always return false when the path field points to a folder. 50 MoodManager::checkMoodValidity() performs the same check. Please help. 51 */ 52 const std::string& path = "ambient/" + MoodManager::defaultMood_ + '/'; 52 const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/."; 53 53 if (!Resource::exists(path)) 54 54 { … … 69 69 void MoodManager::setMood(const std::string& mood) 70 70 { 71 oldMood_ = mood_; 71 72 ModifyConfigValue(mood_, set, mood); 72 73 } … … 75 76 { 76 77 // Generic mood validation 77 const std::string& path = "ambient/" + mood_ + '/';78 const std::string& path = "ambient/" + mood_ + "/."; 78 79 if (!Resource::exists(path)) 79 80 { 80 81 COUT(3) << "Mood " << mood_ << " does not exist. Will not change." << std::endl; 81 ResetConfigValue(mood_);82 this->setMood(oldMood_); 82 83 } 83 84 else -
code/branches/presentation3/src/orxonox/MoodManager.h
r7121 r7147 82 82 // config values 83 83 std::string mood_; 84 std::string oldMood_; 84 85 static const std::string defaultMood_; 85 86
Note: See TracChangeset
for help on using the changeset viewer.