Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (15 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/orxonox/items/Engine.cc

    r5781 r5935  
    3737#include "pickup/ModifierType.h"
    3838#include "tools/Shader.h"
    39 #include "sound/SoundBase.h"
    4039
    4140namespace orxonox
     
    6867        this->setConfigValues();
    6968        this->registerVariables();
    70 
    71         this->sound_ = NULL;
    7269    }
    7370
     
    7976
    8077            if (this->boostBlur_)
    81                 delete this->boostBlur_;
    82 
    83             if(this->sound_ != NULL)
    84                 delete this->sound_;
     78                this->boostBlur_->destroy();
    8579        }
    8680    }
     
    10296        XMLPortParam(Engine, "accelerationleftright", setAccelerationLeftRight, setAccelerationLeftRight, xmlelement, mode);
    10397        XMLPortParam(Engine, "accelerationupdown",    setAccelerationUpDown,    setAccelerationUpDown,    xmlelement, mode);
    104 
    105         XMLPortParamLoadOnly(Engine, "sound", loadSound, xmlelement, mode);
    10698    }
    10799
     
    237229            if (this->boostBlur_)
    238230            {
    239                 delete this->boostBlur_;
     231                this->boostBlur_->destroy();
    240232                this->boostBlur_ = 0;
    241233            }
    242 
    243             if(this->sound_ != NULL)
    244                 this->sound_->attachToEntity(ship);
    245234        }
    246235    }
     
    253242            return Vector3::ZERO;
    254243    }
    255 
    256     void Engine::loadSound(const std::string filename)
    257     {
    258         if(filename == "") return;
    259         else
    260         {
    261             if(this->sound_ == NULL)
    262             {
    263                 this->sound_ = new SoundBase(this->ship_);
    264             }
    265 
    266             this->sound_->loadFile(filename);
    267             this->sound_->play(true);
    268         }
    269     }
    270244}
Note: See TracChangeset for help on using the changeset viewer.