Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2006, 2:36:03 PM (18 years ago)
Author:
patrick
Message:

cr: some bugs found and solved, minor cleanup

File:
1 edited

Legend:

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

    r8110 r8124  
    8080/**
    8181 * registers a new Collision Object
     82 *  @param entityA WorldEntity A of the collision
     83 *  @param entityB WorldEntity B of the collision
    8284 * if a there is already a collision object with the same stats
    8385 * registration will be skipped and the last collision object is returned
     
    9799  // now register it as a shared collision with the other collision entity
    98100  CollisionHandle* ch = entityB->getCollisionHandle(this->type);
    99   if( ch != NULL) {
     101  if( ch != NULL)
    100102    ch->registerSharedCollision(c);
    101     c->setEntityBCollide(true);
    102   }
    103103
    104104  return c;
     
    134134  this->bDispatched = false;
    135135
    136   // first element only
     136  // checks if these WorldEntities have already collided or if its a new collision -> create a new Collision object
    137137 Collision* c = this->registerCollision(collisionEvent->getEntityA(), collisionEvent->getEntityB());
    138138 c->setEntityACollide(true);
     
    178178  vector<long>::iterator it = this->targetList.begin();
    179179  for(; it < this->targetList.end(); it++)
    180   {
    181     if( !collisionEvent->getEntityA()->isA((ClassID)(*it)))
    182       return false;
    183   }
     180    if( collisionEvent->getEntityA()->isA((ClassID)(*it)))
     181      return true;
    184182
    185   return true;
     183  return false;
    186184}
    187185
Note: See TracChangeset for help on using the changeset viewer.