Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8853 in orxonox.OLD


Ignore:
Timestamp:
Jun 28, 2006, 2:36:56 PM (18 years ago)
Author:
patrick
Message:

collision interface extended

Location:
branches/single_player_map/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/collision_reaction/collision_event.h

    r8490 r8853  
    2525  { this->entityA = entityA; this->entityB = entityB; this->bvA = bvA; this->bvB = bvB; }
    2626  /** 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; }
     27  inline void collide(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
     28  { this->entityA = entity; this->entityB = groundEntity, this->groundNormal = normal; this->position = position; this->bInWall = bInWall; }
    2929
    3030
     
    5353  Vector            groundNormal;                  //!< the ground plane with which it collides (only for bsp-model collisions
    5454  Vector            position;                      //!< position of the collision on the ground plane
     55
     56  bool              bInWall;                       //!< true if is in wall
    5557};
    5658
  • branches/single_player_map/src/world_entities/world_entity.cc

    r8834 r8853  
    433433 *  @param position it collides on the plane
    434434 */
    435 bool WorldEntity::registerCollision(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position)
     435bool WorldEntity::registerCollision(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
    436436{
    437437  // is there any handler listening?
     
    442442  CollisionEvent* c = CREngine::getInstance()->popCollisionEventObject();
    443443  assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
    444   c->collide(entity, groundEntity, normal, position);
     444  c->collide(entity, groundEntity, normal, position, bInWall);
    445445
    446446  for( int i = 0; i < CREngine::CR_NUMBER; ++i)
Note: See TracChangeset for help on using the changeset viewer.