Changeset 2082 for code/branches/objecthierarchy/src/orxonox/objects
- Timestamp:
- Nov 1, 2008, 1:48:57 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/EventListener.cc
r2074 r2082 41 41 { 42 42 RegisterObject(EventListener); 43 44 this->bActive_ = false; 43 45 } 44 46 … … 56 58 void EventListener::processEvent(Event& event) 57 59 { 60 if (this->bActive_) 61 { 62 COUT(2) << "Warning: Detected Event loop in EventListener \"" << this->getName() << "\"" << std::endl; 63 return; 64 } 65 66 this->bActive_ = true; 67 58 68 this->fireEvent(event.activate_, event.originator_); 69 70 this->bActive_ = false; 59 71 } 60 72 -
code/branches/objecthierarchy/src/orxonox/objects/EventListener.h
r2074 r2082 55 55 56 56 std::string eventName_; 57 bool bActive_; 57 58 }; 58 59 } -
code/branches/objecthierarchy/src/orxonox/objects/EventTarget.cc
r2074 r2082 64 64 void EventTarget::addAsEvent(BaseObject* object) 65 65 { 66 object->addEvent(this, ""); 66 if (object != (BaseObject*)this) 67 object->addEvent(this, ""); 67 68 } 68 69 }
Note: See TracChangeset
for help on using the changeset viewer.