Changeset 8213 in orxonox.OLD for branches/bsp_model/src/lib/collision_reaction
- Timestamp:
- Jun 7, 2006, 9:06:41 PM (18 years ago)
- Location:
- branches/bsp_model/src/lib/collision_reaction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_reaction/collision_handle.cc
r8190 r8213 24 24 25 25 #include "cr_object_damage.h" 26 #include "cr_physics_ground_walk.h" 26 27 27 28 using namespace std; … … 42 43 this->bDispatched = false; 43 44 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 53 49 54 50 switch( type) 55 51 { 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; 56 59 case CREngine::CR_OBJECT_DAMAGE: 57 60 this->collisionReaction = new CRObjectDamage(); 61 this->bStopOnFirstCollision = true; 58 62 break; 59 63 default: … … 69 73 { 70 74 // delete what has to be deleted here 75 if( this->collisionReaction != NULL) 76 delete this->collisionReaction; 71 77 } 72 78 -
branches/bsp_model/src/lib/collision_reaction/cr_engine.cc
r8190 r8213 124 124 { 125 125 std::vector<CollisionHandle*>::iterator it; 126 for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++) 127 { 128 if( *it == collisionHandle) 129 { 126 for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++) { 127 if( *it == collisionHandle) { 130 128 this->collisionHandles.erase(it); 131 129 delete collisionHandle;
Note: See TracChangeset
for help on using the changeset viewer.