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:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/graphics/ParticleSpawner.cc

    r5781 r5929  
    7171    }
    7272
    73     void ParticleSpawner::processEvent(Event& event)
     73    void ParticleSpawner::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
    7474    {
    75         SUPER(ParticleSpawner, processEvent, event);
     75        SUPER(ParticleSpawner, XMLEventPort, xmlelement, mode);
    7676
    77         ORXONOX_SET_EVENT(ParticleSpawner, "spawn", spawn, event);
     77        XMLPortEventState(ParticleSpawner, BaseObject, "spawn", spawn, xmlelement, mode);
    7878    }
    7979
     
    8888    void ParticleSpawner::startParticleSpawner()
    8989    {
    90         if (!this->particles_)
    91             return;
    92 
    9390        this->setActive(false);
    9491
    9592        if (this->bForceDestroy_ || this->bSuppressStart_)
     93        {
     94            this->timer_.stopTimer();
    9695            return;
     96        }
    9797
    98         this->timer_.setTimer(this->startdelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner)));
     98        this->timer_.setTimer(this->startdelay_, false, createExecutor(createFunctor(&ParticleSpawner::fireParticleSpawner, this)));
    9999    }
    100100
     
    103103        this->setActive(true);
    104104        if (this->lifetime_ != 0)
    105             this->timer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner)));
     105            this->timer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&ParticleSpawner::stopParticleSpawner, this)));
    106106    }
    107107
     
    116116
    117117            if (!this->timer_.isActive() || this->timer_.getRemainingTime() > this->destroydelay_)
    118                 this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner)));
     118                this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::destroyParticleSpawner, this)));
    119119        }
    120120        else if (this->bLoop_)
    121121        {
    122             this->timer_.setTimer(this->destroydelay_, false, this, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner)));
     122            this->timer_.setTimer(this->destroydelay_, false, createExecutor(createFunctor(&ParticleSpawner::startParticleSpawner, this)));
    123123        }
    124124    }
     
    126126    void ParticleSpawner::destroyParticleSpawner()
    127127    {
    128         delete this;
     128        this->destroy();
    129129    }
    130130}
Note: See TracChangeset for help on using the changeset viewer.