Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8166 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 6, 2006, 1:33:36 AM (18 years ago)
Author:
patrick
Message:

cr: more bugs found. its amazing

Location:
branches/cr/src/lib/collision_reaction
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/collision.cc

    r8129 r8166  
    2727Collision::Collision ()
    2828{
    29   this->entityA = NULL;
    30   this->entityB = NULL;
    31 
    32   this->bDispatched = false;
    33   this->entityACollide = false;
    34   this->entityBCollide = false;
     29  this->flushCollisionEvents();
    3530}
    3631
  • branches/cr/src/lib/collision_reaction/collision_handle.cc

    r8165 r8166  
    110110  Collision* c;
    111111  if( this->collisionList.empty() ||
    112       ((this->collisionList.back())->getEntityA() != entityA && (this->collisionList.back())->getEntityB() != entityB ))
     112      ((this->collisionList.back())->getEntityA() != entityA && (this->collisionList.back())->getEntityB() != entityB )) {
    113113    c = CREngine::getInstance()->popCollisionObject();
     114    c->collide(entityA, entityB);
     115    this->collisionList.push_back(c);
     116  }
    114117  else
    115118    c = this->collisionList.back();
    116119
    117   assert( entityA != NULL);
    118   assert( entityB != NULL);
    119   this->collisionList.push_back(c);
    120   c->collide(entityA, entityB);
     120  assert( c->getEntityA() != NULL);
     121  assert( c->getEntityB() != NULL);
    121122
    122123  // now register it as a shared collision with the other collision entity
     
    190191  for(; it < this->collisionList.end(); it++) {
    191192    this->collisionReaction->reactToCollision(*it);
     193    (*it)->flushCollisionEvents();
    192194  }
    193195
  • branches/cr/src/lib/collision_reaction/cr_object_damage.cc

    r8129 r8166  
    5454  float damage;
    5555
     56  assert(collision->getEntityA() != NULL);
     57  assert(collision->getEntityB() != NULL);
     58
    5659  PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n",
    5760            collision->getEntityA()->getClassName(),
Note: See TracChangeset for help on using the changeset viewer.