Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 9:18:40 AM (15 years ago)
Author:
rgrieder
Message:

Removed hard coded sound in Level, Engine and PongBall and replaced SoundMainMenu with a simple SoundBase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/Level.cc

    r5836 r5892  
    3939#include "gametypes/Gametype.h"
    4040#include "overlays/OverlayGroup.h"
    41 #include "sound/SoundBase.h"
    4241#include "LevelManager.h"
    4342
     
    5352        this->xmlfilename_ = this->getFilename();
    5453        this->xmlfile_ = 0;
    55         this->ambientsound_ = 0;
    5654    }
    5755
     
    6563            if (this->xmlfile_)
    6664                Loader::unload(this->xmlfile_);
    67 
    68             if (this->ambientsound_ != NULL)
    69                 delete this->ambientsound_;
    7065        }
    7166    }
     
    7772        XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
    7873        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
    79 
    80         XMLPortParamLoadOnly(Level, "ambientsound", loadAmbientSound, xmlelement, mode);
    8174
    8275        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
     
    150143    }
    151144
    152     void Level::loadAmbientSound(const std::string& filename)
    153     {
    154         if(filename == "") return;
    155         else
    156         {
    157             if(this->ambientsound_ == NULL)
    158             {
    159                 this->ambientsound_ = new SoundBase();
    160             }
    161 
    162             this->ambientsound_->loadFile(filename);
    163             this->ambientsound_->play(true);
    164         }
    165     }
    166 
    167145    void Level::playerEntered(PlayerInfo* player)
    168146    {
Note: See TracChangeset for help on using the changeset viewer.