Changeset 8288 in orxonox.OLD for branches/bsp_model/src/lib/collision_reaction
- Timestamp:
- Jun 8, 2006, 6:30:52 PM (18 years ago)
- Location:
- branches/bsp_model/src/lib/collision_reaction
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_reaction/collision_handle.cc
r8264 r8288 204 204 } 205 205 206 // if continuous poll poll the reaction 207 if( this->bContinuousPoll && this->bCollided) 208 this->collisionReaction->update(this->owner); 209 206 210 // now set state to dispatched 207 211 this->bDispatched = true; 208 212 this->bCollided = false; 209 213 210 // if continuous poll poll the reaction211 if( this->bContinuousPoll)212 this->collisionReaction->update(this->owner);213 214 this->flushCollisions(); 214 215 } … … 232 233 } 233 234 234 235 235 return false; 236 236 } -
branches/bsp_model/src/lib/collision_reaction/cr_object_damage.cc
r8216 r8288 54 54 float damage = 0.0f; 55 55 56 PRINTF( 0)("Dealing damage - Handling collision: %s vs %s\n",56 PRINTF(4)("Dealing damage - Handling collision: %s vs %s\n", 57 57 collision->getEntityA()->getClassName(), 58 58 collision->getEntityB()->getClassName()); … … 63 63 collision->getEntityA()->decreaseHealth(damage); 64 64 } 65 PRINTF( 0)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName());65 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityA()->getClassName()); 66 66 67 67 if( collision->isEntityBCollide()) { … … 69 69 collision->getEntityB()->decreaseHealth(damage); 70 70 } 71 PRINTF( 0)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName());71 PRINTF(4)("Dealing damage - %f damage to %s \n", damage, collision->getEntityB()->getClassName()); 72 72 73 73 collision->flushCollisionEvents(); -
branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8256 r8288 23 23 #include "world_entity.h" 24 24 #include "cr_physics_ground_walk.h" 25 26 #include <vector> 25 27 26 28 using namespace std; … … 51 53 void CRPhysicsGroundWalk::reactToCollision(Collision* collision) 52 54 { 53 // Vector normal = collision 54 PRINTF(0)("Ground\n"); 55 CollisionEvent* ce = collision->getCollisionEvents().front(); 56 Vector normal = ce->getGroundNormal(); 57 normal.normalize(); 58 59 // put it back 60 PRINTF(0)("putting it back\n"); 61 collision->getEntityB()->setVelocity(Vector()); 62 // collision->getEntityB()->setAbsCoorSoft(this->lastPosition, 0.1); 63 // collision->getEntityB()->setAbsCoor(this->lastPosition/* + normal * (-5.0f)*/); 64 65 66 55 67 } 56 68 … … 64 76 this->lastPosition = owner->getAbsCoor(); 65 77 this->lastDirection = owner->getAbsDir(); 66 67 68 78 } 69 79
Note: See TracChangeset
for help on using the changeset viewer.