Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

new collision registration functions

Location:
branches/single_player_map/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/world_entity.cc

    r8853 r8864  
    418418  CollisionEvent* c = CREngine::getInstance()->popCollisionEventObject();
    419419  assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
    420   c->collide(entityA, entityB, bvA, bvB);
     420  c->collide(COLLISION_TYPE_OBB, entityA, entityB, bvA, bvB);
    421421
    422422  for( int i = 0; i < CREngine::CR_NUMBER; ++i)
     
    433433 *  @param position it collides on the plane
    434434 */
    435 bool WorldEntity::registerCollision(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall)
     435bool WorldEntity::registerCollision(int type, 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, bInWall);
     444  c->collide(type, entity, groundEntity, normal, position, bInWall);
    445445
    446446  for( int i = 0; i < CREngine::CR_NUMBER; ++i)
  • branches/single_player_map/src/world_entities/world_entity.h

    r8862 r8864  
    8888
    8989  bool registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB);
    90   bool registerCollision(WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall = false);
     90  bool registerCollision(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall = false);
    9191  /** @return true if there is at least on collision reaction subscribed */
    9292  inline bool isReactive() const { return this->bReactive; }
Note: See TracChangeset for help on using the changeset viewer.