Changeset 9994 in orxonox.OLD for branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
- Timestamp:
- Dec 3, 2006, 6:24:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/lib/collision_reaction/collision_tube.cc
r9985 r9994 34 34 ObjectListDefinition(CollisionTube); 35 35 36 CollisionTube* CollisionTube:: instance= NULL;36 CollisionTube* CollisionTube::singletonRef = NULL; 37 37 38 38 … … 67 67 void CollisionTube::registerCollisionEvent(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) 68 68 { 69 Collision* collision = this->_collisionList.back(); 69 Collision* collision = NULL; 70 if( !this->_collisionList.empty()) 71 collision = this->_collisionList.back(); 70 72 71 // check if there is already a collision defined between these objects 72 if( !collision->match(*entityA, *entityB))73 // check if there is already a collision defined between these objects or this is the first collision at all 74 if( collision != NULL || !collision->match(*entityA, *entityB)) 73 75 { 74 76 collision = CREngine::getInstance()->popCollisionObject(); … … 96 98 { 97 99 // get last collision 98 Collision* collision = this->_collisionList.back(); 100 Collision* collision = NULL; 101 if( !this->_collisionList.empty()) 102 collision = this->_collisionList.back(); 99 103 100 104 // check if there is already a collision defined between these objects
Note: See TracChangeset
for help on using the changeset viewer.