- Timestamp:
- Dec 23, 2009, 8:45:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/sound/AmbientSound.cc
r6394 r6406 35 35 #include "core/XMLPort.h" 36 36 #include "SoundManager.h" 37 #include "MoodManager.h"38 37 39 38 namespace orxonox … … 111 110 { 112 111 this->ambientSource_ = source; 112 this->moodChanged(this->getMood()); 113 } 114 115 void AmbientSound::moodChanged(const std::string& mood) 116 { 113 117 if (GameMode::playsSound()) 114 118 { 115 const std::string& path = "ambient/" + MoodManager::getInstance().getMood() + '/' + source;119 const std::string& path = "ambient/" + MoodManager::getInstance().getMood() + '/' + this->ambientSource_; 116 120 shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(path); 117 121 if (fileInfo != NULL) 118 122 this->setSource(path); 119 123 else 120 COUT(3) << "Sound: " << source<< ": Not a valid name! Ambient sound will not change." << std::endl;124 COUT(3) << "Sound: " << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << std::endl; 121 125 } 122 126 }
Note: See TracChangeset
for help on using the changeset viewer.