Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2008, 11:58:31 PM (16 years ago)
Author:
landauf
Message:

fixed a bug in the event system
fixed a bug in Trigger and tweaked some features

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/core/Event.cc

    r2065 r2069  
    3838    }
    3939
    40     void EventContainer::process(BaseObject* object, const Event& event)
     40    void EventContainer::process(void* object, const Event& event)
    4141    {
    4242        if (this->eventname_ == event.sectionname_)
     
    4747                    ++this->activeEvents_;
    4848                else
     49                {
    4950                    --this->activeEvents_;
    5051
     52                    if (this->activeEvents_ < 0)
     53                        this->activeEvents_ = 0;
     54                }
     55
    5156                if (this->eventfunction_->getParamCount() == 0 && event.activate_)
    52                     (*this->eventfunction_)(object);
     57                    (*this->eventfunction_)();
    5358                else if ((this->activeEvents_ == 1 && event.activate_) || (this->activeEvents_ == 0 && !event.activate_))
    5459                {
    5560                    if (this->eventfunction_->getParamCount() == 1)
    56                         (*this->eventfunction_)(object, this->activeEvents_);
     61                        (*this->eventfunction_)(this->activeEvents_);
    5762                    else if (this->eventfunction_->getParamCount() >= 2 && event.castedOriginator_)
    58                         (*this->eventfunction_)(object, this->activeEvents_, event.castedOriginator_);
     63                        (*this->eventfunction_)(this->activeEvents_, event.castedOriginator_);
    5964                }
    6065            }
Note: See TracChangeset for help on using the changeset viewer.