Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/orxonox/sound/WorldAmbientSound.cc

    r10624 r11054  
    4949        this->ambientSound_ = new AmbientSound();
    5050        this->registerVariables();
    51         soundList_.push_back("Earth.ogg");
    52         soundList_.push_back("Jupiter.ogg");
    53         soundList_.push_back("Mars.ogg");
    54         soundList_.push_back("allgorythm-lift_up.ogg");
    55         soundList_.push_back("allgorythm-resonance_blaster.ogg");
    56         soundList_.push_back("AlphaCentauri.ogg");
    57         soundList_.push_back("Asteroid_rocks.ogg");
    58         soundList_.push_back("Ganymede.ogg");
    59         soundList_.push_back("luke_grey_-_hypermode.ogg");
     51        soundList_.emplace_back("Earth.ogg");
     52        soundList_.emplace_back("Jupiter.ogg");
     53        soundList_.emplace_back("Mars.ogg");
     54        soundList_.emplace_back("allgorythm-lift_up.ogg");
     55        soundList_.emplace_back("allgorythm-resonance_blaster.ogg");
     56        soundList_.emplace_back("AlphaCentauri.ogg");
     57        soundList_.emplace_back("Asteroid_rocks.ogg");
     58        soundList_.emplace_back("Ganymede.ogg");
     59        soundList_.emplace_back("luke_grey_-_hypermode.ogg");
    6060
    6161    }
     
    114114
    115115        //HACK: Assuption - there is only one WorldAmbientSound in a level and only one level is used.
    116         for (ObjectList<WorldAmbientSound>::iterator it = ObjectList<WorldAmbientSound>::begin();
    117              it != ObjectList<WorldAmbientSound>::end(); ++it)
     116        for (WorldAmbientSound* sound : ObjectList<WorldAmbientSound>())
    118117        {
    119             while(it->ambientSound_->setAmbientSource(WorldAmbientSound::soundList_[WorldAmbientSound::soundNumber_]) == false){
     118            while(sound->ambientSound_->setAmbientSource(WorldAmbientSound::soundList_[WorldAmbientSound::soundNumber_]) == false){
    120119                WorldAmbientSound::soundNumber_ = (WorldAmbientSound::soundNumber_ + 1) % WorldAmbientSound::soundList_.size();
    121120            }
Note: See TracChangeset for help on using the changeset viewer.