Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8216 in orxonox.OLD for branches/bsp_model/src/world_entities


Ignore:
Timestamp:
Jun 7, 2006, 9:33:10 PM (19 years ago)
Author:
patrick
Message:

bsp: collision registering should now work

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

Legend:

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

    r8195 r8216  
    410410 *  @param position it collides on the plane
    411411 */
    412 bool WorldEntity::registerCollision(WorldEntity* entity, Plane* plane, Vector position)
     412bool WorldEntity::registerCollision(WorldEntity* entity, Vector normal, Vector position)
    413413{
    414414  // is there any handler listening?
     
    419419  CollisionEvent* c = CREngine::getInstance()->popCollisionEventObject();
    420420  assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h
    421   c->collide(entity, plane, position);
     421  c->collide(entity, normal, position);
    422422
    423423  for( int i = 0; i < CREngine::CR_NUMBER; ++i)
     
    504504  Vector u = Vector(0.0,-20.0,0.0);
    505505
    506          
     506
    507507  if(!(this->getAbsCoor().x == ray_2.x && this->getAbsCoor().y == ray_2.y && this->getAbsCoor().z == ray_2.z) )
    508508  {
     
    521521
    522522  }
    523    
    524    
     523
     524
    525525}
    526526
  • branches/bsp_model/src/world_entities/world_entity.h

    r8190 r8216  
    2929class CollisionHandle;
    3030class Collision;
    31 class Plane;
    3231
    3332
     
    8685
    8786  bool registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB);
    88   bool registerCollision(WorldEntity* entity, Plane* plane, Vector position);
     87  bool registerCollision(WorldEntity* entity, Vector normal, Vector position);
    8988  /** @return true if there is at least on collision reaction subscribed */
    9089  inline bool isReactive() const { return this->bReactive; }
Note: See TracChangeset for help on using the changeset viewer.