Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 20, 2008, 1:47:41 AM (17 years ago)
Author:
landauf
Message:

added MovableEntity with network optimization for constant velocity and rotation

added new Timer feature to destroy a Timer right after it called the function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/tools/Timer.cc

    r1755 r1968  
    9292        this->bLoop_ = false;
    9393        this->bActive_ = false;
     94        this->bKillAfterCall_ = false;
    9495
    9596        this->time_ = 0;
     
    112113    {
    113114        (*this->executor_)();
     115
     116        if (this->bKillAfterCall_)
     117            delete this;
    114118    }
    115119
     
    136140            {
    137141                // It's time to call the function
    138                 if (this->bLoop_)
     142                if (this->bLoop_ && !this->bKillAfterCall_)
    139143                {
    140144                    this->time_ += this->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.
Note: See TracChangeset for help on using the changeset viewer.