Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3461 in orxonox.OLD for orxonox/trunk/src/world.cc


Ignore:
Timestamp:
Mar 9, 2005, 1:23:33 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: cleaning up old stuff in world.cc and its relatives. second step…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world.cc

    r3459 r3461  
    221221            this->localCamera = new Camera(this);
    222222            this->localCamera->setName ("camera");
    223             this->getCamera()->bind (myPlayer);
     223            this->localCamera->bind (myPlayer);
    224224            this->localPlayer->addChild (this->localCamera);
    225225
     
    273273            this->localCamera = new Camera (this);
    274274            this->localCamera->setName ("camera");
    275             this->getCamera()->bind (myPlayer);
     275            this->localCamera->bind (myPlayer);
    276276            this->localPlayer->addChild (this->localCamera);
    277277
     
    660660}
    661661
    662 /**
    663     \brief updates Placements and notifies entities when they left the
    664     world
    665    
    666     This runs trough all WorldEntities and maps Locations to Placements
    667     if they are bound, checks whether they left the level boundaries
    668     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           else
    697             {
    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       else
    712         {
    713         }
    714      
    715       entity = entities->nextElement();
    716     }
    717   */ 
    718 }
    719 
    720662
    721663/**
     
    891833     
    892834      /* update tick the rest */
    893       this->update ();
    894835      this->localCamera->timeSlice(dt);
    895836      this->trackManager->tick(dt);
     
    920861}
    921862
    922 /**
    923    \brief give back active camera
    924    
    925    this passes back the actualy active camera
    926    \todo ability to define more than one camera or camera-places
    927 */
    928 Camera* World::getCamera()
    929 {
    930   return this->localCamera;
    931 }
    932 
    933863
    934864/**
Note: See TracChangeset for help on using the changeset viewer.