Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 12:19:48 AM (18 years ago)
Author:
patrick
Message:

merged the branche single_player_map with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_reaction/collision_event.h

    r8490 r8894  
    99#include "vector.h"
    1010
     11#include "cr_defs.h"
     12
     13
    1114class WorldEntity;
    1215class BoundingVolume;
    1316class Plane;
     17
    1418
    1519
     
    2226
    2327  /** collides two WorldEntities @param entityA world entity A, @param entityB world entity B, @param bvA volume A @param bvB volumeB */
    24   inline void collide(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
    25   { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
     28  inline void collide(int type, WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
     29  { this->collisionType = type; this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
    2630  /** collides two WorldEntities @param entity world entity , @param ground ground plane, @param position position on the ground */
    27   inline void collide(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position)
    28   { this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; }
     31  inline void collide(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
     32  { this->collisionType = type; this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
    2933
    3034
     
    4448  inline Vector getCollisionPosition() { return this->position; }
    4549
     50  /** @return the type of the collision */
     51  inline int getType() { return this->collisionType; }
     52
     53  /** @return true if the entity is in the wall */
     54  inline bool isInWall() { return this->bInWall; }
     55
     56
    4657 private:
    4758  WorldEntity*      entityA;                       //!< the collision body A
     
    5364  Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
    5465  Vector            position;                      //!< position of the collision on the ground plane
     66
     67  bool              bInWall;                       //!< true if is in wall
     68  int               collisionType;                 //!< collision type
    5569};
    5670
Note: See TracChangeset for help on using the changeset viewer.