Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2006, 11:56:02 PM (18 years ago)
Author:
patrick
Message:

bsp: just a very little cleanup to make it more readable. no change in content

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8325 r8334  
    5353void CRPhysicsGroundWalk::reactToCollision(Collision* collision)
    5454{
    55 //   CollisionEvent* ce = collision->getCollisionEvents().front();
    56 //   Vector normal = ce->getGroundNormal();
    57 //   normal.normalize();
    58 //
    59 //   Vector position = ce->getCollisionPosition();
     55  CollisionEvent* ce = collision->getCollisionEvents().front();
     56  Vector normal = ce->getGroundNormal();
     57  normal.normalize();
    6058
     59  // put it back
     60  PRINTF(0)("putting it back to lastPos: \n");
     61  this->lastPosition.debug();
     62  PRINTF(0)("current pos:\n");
     63  collision->getEntityB()->getAbsCoor().debug();
    6164
    62   if( this->lastPosition != collision->getEntityB()->getAbsCoor())
    63   {
    64   // put it back
    65     PRINTF(0)("putting it back to: \n");
    66     this->lastPosition.debug();
    67     this->afterLastPosition.debug();
    68 
    69     collision->getEntityB()->setVelocity(Vector());
    70     collision->getEntityB()->setAbsCoor(this->afterLastPosition);
    71   }
     65  collision->getEntityB()->setVelocity(Vector());
     66  collision->getEntityB()->setAbsCoor(this->lastPosition);
    7267}
    7368
Note: See TracChangeset for help on using the changeset viewer.