Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5877 in orxonox.OLD for branches/spaceshipcontrol/src


Ignore:
Timestamp:
Dec 2, 2005, 4:27:53 PM (19 years ago)
Author:
bensch
Message:

controll: registerEvent

Location:
branches/spaceshipcontrol/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/playable.cc

    r5876 r5877  
    4444  /*EventHandler*/
    4545  EventHandler* evh = EventHandler::getInstance();
    46   std::list<Event*>::iterator ev;
     46  std::list<int>::iterator ev;
    4747  for (ev = this->events.begin(); ev != events.end(); ev++)
    4848  {
    49     if (!evh->isSubscribed(ES_GAME, (*ev)->type))
    50       evh->subscribe(player, ES_GAME, (*ev)->type);
     49    evh->subscribe(player, ES_GAME, (*ev));
    5150  }
    5251
  • branches/spaceshipcontrol/src/world_entities/playable.h

    r5876 r5877  
    3535    virtual void process(const Event &event) {} //= 0;
    3636    virtual void setKeySet() {};
    37     inline const std::list<Event*>& getEventList() { return this->events; };
     37    inline const std::list<int>& getEventList() { return this->events; };
    3838
     39  protected:
     40    void registerEvent(int eventType);
    3941
    4042  private:
    4143
    4244    WeaponManager*        weaponMan;          //!< the weapon manager: managing a list of weapon to wepaon-slot mapping
    43     std::list<Event*>     events;
     45    std::list<int>        events;
    4446    //todo: add a event to id mapping list
    4547
Note: See TracChangeset for help on using the changeset viewer.