Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2019, 5:15:43 PM (5 years ago)
Author:
ahuwyler
Message:

Here and there

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc

    r12364 r12366  
    6565        this->speed_ = 0;
    6666        this->accelerationFactor_ = 1.0f;
    67         this->bDeleteBats_ = false;
     67       
    6868        this->relMercyOffset_ = 0.05f;
    6969        this->orxoblox_ = this->getOrxoBlox();
     
    7777                 this->defScoreSound_ = new WorldSound(this->getContext());
    7878                 this->defScoreSound_->setVolume(1.0f);
    79                  this->defBatSound_ = new WorldSound(this->getContext());
    80                  this->defBatSound_->setVolume(0.4f);
     79                 
    8180                 this->defBoundarySound_ = new WorldSound(this->getContext());
    8281                 this->defBoundarySound_->setVolume(0.5f);
     
    8584             {
    8685                 this->defScoreSound_ = nullptr;
    87                  this->defBatSound_ = nullptr;
     86                 
    8887                 this->defBoundarySound_ = nullptr;
    8988             }
     
    9695    OrxoBloxBall::~OrxoBloxBall()
    9796    {
    98         if (this->isInitialized())
    99         {
    100             if (this->bDeleteBats_)
    101 
    102             delete[] this->batID_;
    103         }
     97       
    10498    }
    10599
     
    109103        SUPER(OrxoBloxBall, XMLPort, xmlelement, mode);
    110104        XMLPortParam(OrxoBloxBall, "defScoreSound",  setDefScoreSound,  getDefScoreSound,  xmlelement, mode);
    111         XMLPortParam(OrxoBloxBall, "defBatSound",  setDefBatSound,  getDefBatSound,  xmlelement, mode);
     105       
    112106        XMLPortParam(OrxoBloxBall, "defBoundarySound",  setDefBoundarySound,  getDefBoundarySound,  xmlelement, mode);
    113107    }
     
    121115        registerVariable( this->fieldWidth_ );
    122116        registerVariable( this->fieldHeight_ );
    123         registerVariable( this->batlength_ );
     117       
    124118        registerVariable( this->speed_ );
    125119        registerVariable( this->relMercyOffset_ );
     
    275269    }
    276270
    277     void OrxoBloxBall::setDefBatSound(const std::string &OrxoBloxSound)
    278     {
    279         if( defBatSound_ )
    280             defBatSound_->setSource(OrxoBloxSound);
    281         else
    282             assert(0); // This should never happen, because soundpointer is only available on master
    283     }
    284 
    285     const std::string& OrxoBloxBall::getDefBatSound()
    286     {
    287         if( defBatSound_ )
    288             return defBatSound_->getSource();
    289         else
    290             assert(0);
    291         return BLANKSTRING;
    292     }
    293 
     271   
     272   
    294273    void OrxoBloxBall::setDefBoundarySound(const std::string &OrxoBloxSound)
    295274    {
Note: See TracChangeset for help on using the changeset viewer.