Changeset 8182 in orxonox.OLD for branches/cr/src/world_entities/world_entity.cc
- Timestamp:
- Jun 7, 2006, 11:41:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/world_entities/world_entity.cc
r8169 r8182 368 368 369 369 /** 370 * registers a new collision to this world entity370 * registers a new collision event to this world entity 371 371 * @param collisionEvent the event 372 372 */ … … 381 381 assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h 382 382 c->collide(entityA, entityB, bvA, bvB); 383 384 for( int i = 0; i < CREngine::CR_NUMBER; ++i) 385 if( this->collisionHandles[i] != NULL) 386 this->collisionHandles[i]->registerCollisionEvent(c); 387 } 388 389 390 /** 391 * registers a new collision event to this woeld entity 392 * @param entity the entity that collides 393 * @param plane it stands on 394 * @param position it collides on the plane 395 */ 396 bool WorldEntity::registerCollision(WorldEntity* entity, Plane* plane, Vector position) 397 { 398 // is there any handler listening? 399 if( !this->bReactive) 400 return false; 401 402 // create a collision event 403 CollisionEvent* c = CREngine::getInstance()->popCollisionEventObject(); 404 assert(c != NULL); // if this should fail: we got not enough precached CollisionEvents: alter value in cr_defs.h 405 c->collide(entity, plane, position); 383 406 384 407 for( int i = 0; i < CREngine::CR_NUMBER; ++i)
Note: See TracChangeset
for help on using the changeset viewer.