Changeset 8049 in orxonox.OLD for branches/cr/src/lib/collision_reaction
- Timestamp:
- May 31, 2006, 11:12:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_reaction/cr_object_damage.cc
r8047 r8049 17 17 18 18 #include "collision.h" 19 20 #include "cr_object_damage.h" 19 #include "collision_event.h" 21 20 22 21 #include "physics_interface.h" 22 23 #include "world_entity.h" 24 #include "cr_object_damage.h" 23 25 24 26 using namespace std; … … 54 56 float velocity; 55 57 58 PhysicsInterface* pi; 59 56 60 const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents()); 57 61 std::vector<CollisionEvent*>::const_iterator it = collisionEvents->begin(); 58 62 for(; it != collisionEvents->end(); it++) 59 63 { 64 pi = &(*it)->getEntityA()->getPhysicsInterface(); 60 65 // go through the collisions and try to estimate the damage 61 mass = (*it)->getEntityA()->getPhysicsInterface()->getMass();66 mass = pi->getMass(); 62 67 } 63 68
Note: See TracChangeset
for help on using the changeset viewer.