Changeset 3461 in orxonox.OLD for orxonox/trunk/src/world.cc
- Timestamp:
- Mar 9, 2005, 1:23:33 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world.cc
r3459 r3461 221 221 this->localCamera = new Camera(this); 222 222 this->localCamera->setName ("camera"); 223 this-> getCamera()->bind (myPlayer);223 this->localCamera->bind (myPlayer); 224 224 this->localPlayer->addChild (this->localCamera); 225 225 … … 273 273 this->localCamera = new Camera (this); 274 274 this->localCamera->setName ("camera"); 275 this-> getCamera()->bind (myPlayer);275 this->localCamera->bind (myPlayer); 276 276 this->localPlayer->addChild (this->localCamera); 277 277 … … 660 660 } 661 661 662 /**663 \brief updates Placements and notifies entities when they left the664 world665 666 This runs trough all WorldEntities and maps Locations to Placements667 if they are bound, checks whether they left the level boundaries668 and calls appropriate functions.669 */670 void World::update ()671 {672 /*673 //List<WorldEntity> *l;674 WorldEntity* entity;675 Location* loc;676 Placement* plc;677 Uint32 t;678 679 // l = entities->enumerate();680 entity = this->entities->enumerate();681 while( entity != NULL )682 {683 684 685 if( !entity->isFree() )686 {687 loc = entity->getLocation();688 plc = entity->getPlacement();689 t = loc->part;690 691 if( t >= traclen )692 {693 printf("An entity is out of the game area\n");694 entity->leftWorld ();695 }696 else697 {698 while( track[t].mapCoords( loc, plc) )699 {700 track[t].postLeave (entity);701 if( loc->part >= tracklen )702 {703 printf("An entity has left the game area\n");704 entity->leftWorld ();705 break;706 }707 track[loc->part].postEnter (entity);708 }709 }710 }711 else712 {713 }714 715 entity = entities->nextElement();716 }717 */718 }719 720 662 721 663 /** … … 891 833 892 834 /* update tick the rest */ 893 this->update ();894 835 this->localCamera->timeSlice(dt); 895 836 this->trackManager->tick(dt); … … 920 861 } 921 862 922 /**923 \brief give back active camera924 925 this passes back the actualy active camera926 \todo ability to define more than one camera or camera-places927 */928 Camera* World::getCamera()929 {930 return this->localCamera;931 }932 933 863 934 864 /**
Note: See TracChangeset
for help on using the changeset viewer.