Changeset 9981 in orxonox.OLD for branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
- Timestamp:
- Dec 2, 2006, 3:34:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
r9980 r9981 44 44 { 45 45 this->registerObject(this, CollisionTube::_objectList); 46 47 48 // push the collision reaction object on the list in the right order 49 // WARNING: do not mess with the order, it should be the same as in 50 51 // physical reactions 52 this->_reactionList[CREngine::CR_PHYSICS_MOMENTUM] = NULL; 53 this->_reactionList[CREngine::CR_PHYSICS_STEP_BACK] = NULL; 54 this->_reactionList[CREngine::CR_PHYSICS_GROUND_WALK] = new CRPhysicsGroundWalk(); 55 this->_reactionList[CREngine::CR_PHYSICS_FULL_WALK] = new CRPhysicsFullWalk(); 56 this->_reactionList[CREngine::CR_PHYSICS_DAMAGE] = NULL; 57 // object based reactions 58 this->_reactionList[CREngine::CR_OBJECT_DAMAGE] = new CRObjectDamage(); 59 this->_reactionList[CREngine::CR_OBJECT_PICKUP] = NULL; 60 // misc reactions 61 this->_reactionList[CREngine::CR_VERTEX_TRAFO] = NULL; 62 this->_reactionList[CREngine::CR_SPECIAL_CALLBACK] = NULL; 46 63 } 47 64 … … 123 140 for(; ci < this->_collisionList.end(); ++ci) 124 141 { 125 // check if entity A is subscibed for this event 126 (*ci)->getEntityA()-> 127 128 // check if entity B is subscribed for this event 129 142 for( int i = CREngine::CR_PHYSICS_MOMENTUM; i < CREngine::CR_NUBER; i++) 143 { 144 // check if entity A or B is subscibed for this event 145 if( (*ci)->getEntityA()->bReactibe((*it)->getEnityB(), i) || (*ci)->getEntityB()->bReactibe((*it)->getEnityA(), i)) 146 (*ci)->reactToCollision(*ci); 147 } 130 148 } 131 149 }
Note: See TracChangeset
for help on using the changeset viewer.