Changeset 9985 in orxonox.OLD for branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
- Timestamp:
- Dec 2, 2006, 4:28:11 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
r9983 r9985 44 44 { 45 45 this->registerObject(this, CollisionTube::_objectList); 46 47 48 // push the collision reaction object on the list in the right order49 // WARNING: do not mess with the order, it should be the same as in50 51 // physical reactions52 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 reactions58 this->_reactionList[CREngine::CR_OBJECT_DAMAGE] = new CRObjectDamage();59 this->_reactionList[CREngine::CR_OBJECT_PICKUP] = NULL;60 // misc reactions61 this->_reactionList[CREngine::CR_VERTEX_TRAFO] = NULL;62 this->_reactionList[CREngine::CR_SPECIAL_CALLBACK] = NULL;63 46 } 64 47 … … 131 114 132 115 133 /**134 * handles all collisions in registered in this tube135 */136 void CollisionTube::handleCollisions()137 {138 // for all collisions:139 CollisionIterator ci = this->_collisionList.begin();140 for(; ci < this->_collisionList.end(); ++ci)141 {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 event145 if( (*ci)->getEntityA()->bReactibe((*it)->getEnityB(), i) || (*ci)->getEntityB()->bReactibe((*it)->getEnityA(), i))146 (*ci)->reactToCollision(*ci);147 148 (*ci)->flushCollisionEvents();149 }150 }151 }152 153 154 155 156 157 158 159 116 }// namespace end 160 117
Note: See TracChangeset
for help on using the changeset viewer.