Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7932 in orxonox.OLD for branches/cr/src/world_entities


Ignore:
Timestamp:
May 28, 2006, 9:00:40 PM (19 years ago)
Author:
patrick
Message:

cr: reaction subscription stuff

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

Legend:

Unmodified
Added
Removed
  • branches/cr/src/world_entities/world_entity.cc

    r7927 r7932  
    6969
    7070  this->toList(OM_NULL);
    71 
    72   //this->collisionHandles = new *CollisionHandle[CREngine::CR_NUMBER]();
    7371}
    7472
     
    242240 */
    243241void WorldEntity::subscribeReaction(CREngine::CRType type, int nrOfTargets, ...)
    244 {}
     242{
     243
     244  this->collisionHandles[type] = CREngine::getInstance()->subscribeReaction(this, type);
     245
     246  va_list itemlist;
     247  va_start (itemlist, CREngine::CRType);
     248  for (int i = 0; i < nrOfTargets; i++)
     249    this->collisionHandles[type].push_back(va_arg(itemlist, long));
     250  va_end(itemlist);
     251}
    245252
    246253
  • branches/cr/src/world_entities/world_entity.h

    r7927 r7932  
    130130  bool                    bVisible;           //!< If it should be visible.
    131131
    132   OM_LIST                           objectListNumber;   //!< The ObjectList from ObjectManager this Entity is in.
    133   ObjectManager::EntityList::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
     132  OM_LIST                           objectListNumber;             //!< The ObjectList from ObjectManager this Entity is in.
     133  ObjectManager::EntityList::iterator objectListIterator;         //!< The iterator position of this Entity in the given list of the ObjectManager.
    134134
    135   float                   scaling;
    136   CollisionHandle**       collisionHandles;
     135  float                   scaling;                                //!< the scaling of the model
     136  CollisionHandle*        collisionHandles[CREngine::CR_NUMBER];  //!< the list of the collision reactions
    137137
    138138
Note: See TracChangeset for help on using the changeset viewer.