Changeset 10011 in orxonox.OLD for branches/coll_rect.merge/src/lib
- Timestamp:
- Dec 4, 2006, 5:16:13 PM (18 years ago)
- Location:
- branches/coll_rect.merge/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect.merge/src/lib/collision_detection/obb_tree_node.cc
r10010 r10011 479 479 return; 480 480 481 if( !CoRe::CollisionTube::getInstance()->isReactive( *nodeA, *nodeB) ) 482 return; 481 #warning this should be done 482 // if( !CoRe::CollisionTube::getInstance()->isReactive( *nodeA, *nodeB) ) 483 // return; 483 484 484 485 // float distanceMax = this->bvElement->radius + ((OBBTreeNode*)treeNode)->bvElement->radius; … … 571 572 (treeNode->nodeRight == NULL && treeNode->nodeLeft == NULL)) ) 572 573 { 573 PRINTF(0)("----------------------------------------------\n\n\n\n\n\n--------------------------------\n\n\n");574 //PRINTF(0)("----------------------------------------------\n\n\n\n\n\n--------------------------------\n\n\n"); 574 575 CoRe::CollisionTube::getInstance()->registerCollisionEvent( nodeA, nodeB, (BoundingVolume*)this->bvElement, (BoundingVolume*)treeNode->bvElement); 575 576 } -
branches/coll_rect.merge/src/lib/collision_reaction/collision.h
r10010 r10011 81 81 inline bool isEntityBCollide() const { return this->_entityBCollide; } 82 82 /** sets the flag if it reacts @param flag true if it should react on entityB*/ 83 inline void setEntityBCollide(bool flag) { this->_entity ACollide = flag; }83 inline void setEntityBCollide(bool flag) { this->_entityBCollide = flag; } 84 84 85 85 -
branches/coll_rect.merge/src/lib/collision_reaction/cr_engine.cc
r10010 r10011 164 164 continue; 165 165 166 assert((*ci)->getEntityA() != NULL && (*ci)->getEntityB() != NULL);167 168 166 // PRINTF(0)("CR CHECK: collision between: %s, %s\n", (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str()); 169 167 170 168 // check if entity A or B is subscibed for this event 171 if( (*ci)->getEntityA()->isReactive(*(*ci)->getEntityB(), (CREngine::ReactionType)i) || 172 (*ci)->getEntityB()->isReactive(*(*ci)->getEntityA(), (CREngine::ReactionType)i)) 169 bool aReact = (*ci)->getEntityA()->isReactive(*(*ci)->getEntityB(), (CREngine::ReactionType)i); 170 bool bReact = (*ci)->getEntityB()->isReactive(*(*ci)->getEntityA(), (CREngine::ReactionType)i); 171 172 // store this information 173 (*ci)->setEntityACollide(aReact); 174 (*ci)->setEntityBCollide(bReact); 175 176 // and execute the reaction 177 if( aReact || bReact) 173 178 { 174 179 this->_reactionList[i]->reactToCollision(*ci); 175 PRINTF(0)("executing reaction: %s, between %s - %s\n", this->_reactionList[i]->getClassName().c_str(), (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str());180 //PRINTF(0)("executing reaction: %s, between %s - %s\n", this->_reactionList[i]->getClassName().c_str(), (*ci)->getEntityA()->getClassName().c_str(), (*ci)->getEntityB()->getClassName().c_str()); 176 181 } 177 182 } -
branches/coll_rect.merge/src/lib/collision_reaction/cr_object_damage.cc
r10010 r10011 55 55 float damage = 0.0f; 56 56 57 PRINTF( 4)("Dealing damage - Handling collision: %s vs %s\n",57 PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n", 58 58 collision->getEntityA()->getClassCName(), 59 59 collision->getEntityB()->getClassCName()); … … 64 64 damage = collision->getEntityB()->getDamage(); 65 65 collision->getEntityA()->hit(damage, collision->getEntityB()); 66 PRINTF( 4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassCName());66 PRINTF(0)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassCName()); 67 67 } 68 68 … … 71 71 damage = collision->getEntityA()->getDamage(); 72 72 collision->getEntityB()->hit(damage, collision->getEntityA()); 73 PRINTF( 4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassCName());73 PRINTF(0)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassCName()); 74 74 } 75 75
Note: See TracChangeset
for help on using the changeset viewer.