Changeset 8110 in orxonox.OLD for branches/cr/src/lib
- Timestamp:
- Jun 2, 2006, 12:53:16 AM (18 years ago)
- Location:
- branches/cr/src/lib/collision_reaction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/collision_handle.cc
r8109 r8110 93 93 c = this->collisionList.back(); 94 94 95 c->collide(entityA, entityB);96 c->setEntityACollide(true);97 95 this->collisionList.push_back(c); 98 96 … … 118 116 // set the state to not dispatched 119 117 this->bDispatched = false; 118 collision->setEntityBCollide(true); 120 119 121 120 this->collisionList.push_back(collision); … … 137 136 // first element only 138 137 Collision* c = this->registerCollision(collisionEvent->getEntityA(), collisionEvent->getEntityB()); 138 c->setEntityACollide(true); 139 139 140 c->registerCollisionEvent(collisionEvent); 140 141 141 } 142 142 -
branches/cr/src/lib/collision_reaction/cr_object_damage.cc
r8108 r8110 52 52 void CRObjectDamage::reactToCollision(Collision* collision) 53 53 { 54 float damage; 54 55 55 // if(collision->) 56 // the collision damage been dealed by the entity 57 if( collision->isEntityACollide()) { 58 damage = collision->getEntityB()->getHealthMax(); 59 collision->getEntityA()->decreaseHealth(damage); 60 } 61 if( collision->isEntityBCollide()) { 62 damage = collision->getEntityA()->getHealthMax(); 63 collision->getEntityB()->decreaseHealth(damage); 64 } 56 65 57 66 // const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
Note: See TracChangeset
for help on using the changeset viewer.