Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2009, 8:20:07 PM (15 years ago)
Author:
rgrieder
Message:

Merged core5 branch back to the trunk.
Key features include clean level unloading and an extended XML event system.

Two important notes:
Delete your keybindings.ini files! * or you will still get parser errors when loading the key bindings.
Delete build_dir/lib/modules/libgamestates.module! * or orxonox won't start.
Best thing to do is to delete the build folder ;)

Location:
code/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/items/Engine.cc

    r5781 r5929  
    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}
  • code/trunk/src/orxonox/items/Engine.h

    r5781 r5929  
    130130            Shader* boostBlur_;
    131131            float blurStrength_;
    132 
    133             SoundBase* sound_;
    134132    };
    135133}
  • code/trunk/src/orxonox/items/MultiStateEngine.cc

    r5781 r5929  
    6060            // We have no ship, so the effects are not attached and won't be destroyed automatically
    6161            for (std::list<WorldEntity*>::const_iterator it = this->activeEffects_.begin(); it != this->activeEffects_.end(); ++it)
    62                 delete (*it);
     62                (*it)->destroy();
    6363            for (std::list<WorldEntity*>::const_iterator it = this->forwardEffects_.begin(); it != this->forwardEffects_.end(); ++it)
    64                 delete (*it);
     64                (*it)->destroy();
    6565            for (std::list<WorldEntity*>::const_iterator it = this->boostEffects_.begin(); it != this->boostEffects_.end(); ++it)
    66                 delete (*it);
     66                (*it)->destroy();
    6767            for (std::list<WorldEntity*>::const_iterator it = this->brakeEffects_.begin(); it != this->brakeEffects_.end(); ++it)
    68                 delete (*it);
     68                (*it)->destroy();
    6969        }
    7070    }
     
    9191            if (this->getShip()->hasLocalController())
    9292            {
    93                 this->setObjectMode(ObjectDirection::Bidirectional);
     93                this->setSyncMode(ObjectDirection::Bidirectional);
    9494
    9595                const Vector3& direction = this->getDirection();
Note: See TracChangeset for help on using the changeset viewer.