Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2006, 9:06:41 PM (18 years ago)
Author:
patrick
Message:

bsp: integrating the bspmanager fully into the collision detection/reaction system

File:
1 edited

Legend:

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

    r8190 r8213  
    2424
    2525#include "cr_object_damage.h"
     26#include "cr_physics_ground_walk.h"
    2627
    2728using namespace std;
     
    4243  this->bDispatched = false;
    4344
    44   if( this->type == CREngine::CR_PHYSICS_STEP_BACK)
    45     this->bContinuousPoll = false;
    46   else
    47     this->bContinuousPoll = true;
    48 
    49   if( this->type == CREngine::CR_OBJECT_DAMAGE)
    50     this->bStopOnFirstCollision = true;
    51   else
    52    this->bStopOnFirstCollision = false;
     45  this->collisionReaction = NULL;
     46  this->bContinuousPoll = true;
     47  this->bStopOnFirstCollision = false;
     48
    5349
    5450  switch( type)
    5551  {
     52    case CREngine::CR_PHYSICS_STEP_BACK:
     53//       this->collisionReaction = new CRPhysicsGroundWalk();
     54      this->bContinuousPoll = true;
     55      break;
     56    case CREngine::CR_PHYSICS_GROUND_WALK:
     57      this->collisionReaction = new CRPhysicsGroundWalk();
     58      break;
    5659    case CREngine::CR_OBJECT_DAMAGE:
    5760      this->collisionReaction = new CRObjectDamage();
     61      this->bStopOnFirstCollision = true;
    5862      break;
    5963    default:
     
    6973{
    7074  // delete what has to be deleted here
     75  if( this->collisionReaction != NULL)
     76    delete this->collisionReaction;
    7177}
    7278
Note: See TracChangeset for help on using the changeset viewer.