Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2008, 12:11:25 AM (16 years ago)
Author:
rgrieder
Message:
  • rearranged function calls in Orxonox.cc has yet to be looked at clearly, commented and COUTed
  • works so far, but using 3 little hacks… in hacky classes
Location:
code/branches/ogre/src/orxonox/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ogre/src/orxonox/objects/Explosion.cc

    r1056 r1243  
    4747    Explosion::Explosion(WorldEntity* owner)
    4848    {
    49         RegisterObject(Explosion);
    50 
    5149        this->particle_ = 0;
    5250        this->lifetime_ = 0.4;
     51
     52        RegisterObject(Explosion);
    5353
    5454        if (owner)
  • code/branches/ogre/src/orxonox/objects/SpaceShip.cc

    r1219 r1243  
    6464    SpaceShip::SpaceShip()
    6565    {
    66         RegisterObject(SpaceShip);
    67         this->registerAllVariables();
    68 
    6966        SpaceShip::instance_s = this;
    70 
    71         this->setConfigValues();
    7267
    7368        this->setMouseEventCallback_ = false;
     
    139134//         this->create();
    140135
     136        RegisterObject(SpaceShip);
     137        this->registerAllVariables();
     138        this->setConfigValues();
    141139
    142140        COUT(3) << "Info: SpaceShip was loaded" << std::endl;
     
    166164    void SpaceShip::init()
    167165    {
     166        if (!setMouseEventCallback_)
     167        {
     168          InputManager::addMouseHandler(this, "SpaceShip");
     169          setMouseEventCallback_ = true;
     170        }
     171
    168172        // START CREATING THRUSTER
    169173        this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
     
    428432    void SpaceShip::tick(float dt)
    429433    {
    430         if (!setMouseEventCallback_)
    431         {
    432           InputManager::addMouseHandler(this, "SpaceShip");
    433           setMouseEventCallback_ = true;
    434         }
    435 
    436434        if (this->redNode_ && this->greenNode_)
    437435        {
  • code/branches/ogre/src/orxonox/objects/WorldEntity.cc

    r1209 r1243  
    4747    WorldEntity::WorldEntity()
    4848    {
    49         RegisterObject(WorldEntity);
    50 
    51         //create();
    52 
    5349        this->bStatic_ = true;
    5450        this->velocity_ = Vector3(0, 0, 0);
     
    5753        this->rotationRate_ = 0;
    5854        this->momentum_ = 0;
     55
     56        RegisterObject(WorldEntity);
    5957
    6058        if (GraphicsEngine::getSingleton().getSceneManager())
Note: See TracChangeset for help on using the changeset viewer.