Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 4:51:08 AM (15 years ago)
Author:
landauf
Message:

Fixed an issue with the new event-system: even states which weren't declared are not loaded. While this is normally fine, it is a problem in EventDispatcher and EventTarget which have to pipe events to other objects and therefore have to support any state, not just the native ones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/objects/eventsystem/EventTarget.cc

    r5882 r5887  
    2929#include "EventTarget.h"
    3030#include "core/CoreIncludes.h"
     31#include "core/XMLPort.h"
    3132
    3233namespace orxonox
     
    4344    }
    4445   
     46    void EventTarget::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     47    {
     48        SUPER(EventTarget, XMLPort, xmlelement, mode);
     49
     50        // since we need event sources mapped to any state, we have to parse XML by ourselves
     51        this->loadAllEventStates(xmlelement, mode, this, Class(EventTarget));
     52    }
     53
    4554    void EventTarget::processEvent(Event& event)
    4655    {
Note: See TracChangeset for help on using the changeset viewer.