Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2013, 4:06:38 PM (10 years ago)
Author:
thiweber
Message:

A few changes..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sfxThilo/src/orxonox/sound/AmbientSound.cc

    r8861 r9889  
    7979    }
    8080
    81     void AmbientSound::setAmbientSource(const std::string& source)
     81    bool AmbientSound::setAmbientSource(const std::string& source)
    8282    {
    8383        this->ambientSource_ = source;
    84         this->moodChanged(MoodManager::getInstance().getMood());
     84        return(this->moodChanged(MoodManager::getInstance().getMood()));
    8585    }
    8686
    87     void AmbientSound::moodChanged(const std::string& mood)
     87    bool AmbientSound::moodChanged(const std::string& mood)
    8888    {
    8989        if (GameMode::playsSound())
     
    9595                orxout(user_info) << "Loading ambient sound " << path << "..." << endl; // TODO: make this output internal if we implement sound streaming
    9696                this->setSource(path);
     97
     98                // all went fine
     99                return true;
    97100            }
    98101            else
    99102            {
    100103                orxout(internal_warning, context::sound) << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << endl;
     104
     105                // everything went southways
     106                return false;
    101107            }
    102108        }
     109        return false;
    103110    }
    104111
Note: See TracChangeset for help on using the changeset viewer.