Last change
on this file since 8336 was
8336,
checked in by patrick, 18 years ago
|
bsp: better collision ground reaction: now it jumps back. but there are still bugs and freezes
|
File size:
914 bytes
|
Rev | Line | |
---|
[8200] | 1 | /*! |
---|
| 2 | * @file cr_object_damage.h |
---|
| 3 | * Definition of a collision reaction: dealing damage to an object |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _CR_PHYSICS_GROUND_WALK_H |
---|
| 7 | #define _CR_PHYSICS_GROUND_WALK_H |
---|
| 8 | |
---|
| 9 | #include "collision_reaction.h" |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | class Collision; |
---|
| 13 | |
---|
| 14 | //! A class representing a reaction to a collision: dealing damage to an object |
---|
| 15 | class CRPhysicsGroundWalk : public CollisionReaction |
---|
| 16 | { |
---|
| 17 | public: |
---|
| 18 | CRPhysicsGroundWalk(); |
---|
| 19 | virtual ~CRPhysicsGroundWalk(); |
---|
| 20 | |
---|
| 21 | virtual void reactToCollision(Collision* collision); |
---|
| 22 | |
---|
[8256] | 23 | virtual void update(WorldEntity* entity); |
---|
| 24 | |
---|
[8200] | 25 | private: |
---|
[8221] | 26 | Vector lastPosition; //!< vector with the last valid position |
---|
[8325] | 27 | Vector afterLastPosition; //!< vector for the after last |
---|
[8256] | 28 | Quaternion lastDirection; //!< quat with the last valid direction |
---|
[8336] | 29 | |
---|
| 30 | Vector lastPositions[10]; //!< last 10 positions |
---|
[8200] | 31 | }; |
---|
| 32 | |
---|
| 33 | #endif /* _CR_PHYSICS_GROUND_WALK_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.