Changeset 8216 in orxonox.OLD for branches/bsp_model/src/lib
- Timestamp:
- Jun 7, 2006, 9:33:10 PM (19 years ago)
- Location:
- branches/bsp_model/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_reaction/collision_event.h
r8203 r8216 25 25 { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; } 26 26 /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */ 27 inline void collide(WorldEntity* entity, Plane* ground, Vector position)28 { this->entityA = entity; this->ground = ground; this->position = position; }27 inline void collide(WorldEntity* entity, Vector normal, Vector position) 28 { this->entityA = entity; this->groundNormal = normal; this->position = position; } 29 29 30 30 … … 39 39 40 40 /** @return ground plane if collided with bsp model */ 41 inline Plane* getGroundPlane() { return this->ground; } 42 43 44 45 inline void operator()(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB) { this->collide(entityA, entityB, bvA, bvB); } 46 inline void operator()(WorldEntity* entity, Plane* ground, Vector position) { this->collide(entity, ground, position); } 41 inline Vector getGroundNormal() { return this->groundNormal; } 47 42 48 43 … … 54 49 BoundingVolume* bvB; //!< reference to the bounding volume B 55 50 56 Plane* ground;//!< the ground plane with which it collides (only for bsp-model collisions51 Vector groundNormal; //!< the ground plane with which it collides (only for bsp-model collisions 57 52 Vector position; //!< position of the collision on the ground plane 58 53 }; -
branches/bsp_model/src/lib/collision_reaction/cr_object_damage.cc
r8190 r8216 52 52 void CRObjectDamage::reactToCollision(Collision* collision) 53 53 { 54 float damage ;54 float damage = 0.0f; 55 55 56 56 PRINTF(0)("Dealing damage - Handling collision: %s vs %s\n", -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8215 r8216 874 874 875 875 876 877 878 879 880 881 882 876 if(!worldEntity->isA(CL_PLAYABLE)) { 883 877 … … 937 931 // Return the normal here: Normal's stored in this->collPlane; 938 932 939 if(collision) worldEntity->collidesWithGround(out,out1,out2); 940 // registerCollision(WorldEntity* entity, Vector(this->collPlane.x, ), Vector position); 941 942 } 943 933 if(collision) 934 worldEntity->registerCollision(worldEntity, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out); 935 // worldEntity->collidesWithGround(out,out1,out2); 936 } 944 937 } 945 938
Note: See TracChangeset
for help on using the changeset viewer.