Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Dec 16, 2004, 5:05:16 PM (21 years ago)
Author:
patrick
Message:

orxonox/trunk/src: state-freeze - redefinig destroy functions, some comments

File:
1 edited

Legend:

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

    r3175 r3194  
    7575  this->bQuitCurrentGame = true;
    7676  this->localCamera->setWorld(NULL);
    77   this->entities->clear();
     77  WorldEntity* entity = entities->enumerate(); 
     78  while( entity != NULL )
     79    {
     80      entity->destroy();
     81      entity = entities->nextElement();
     82    }
     83  this->entities->destroy();
    7884  Orxonox::getInstance()->get_localinput()->reset();
    79   this->~World();
    8085}
    8186
     
    114119                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    115120              }
    116            
     121            // !\todo old track-system has to be removed
     122
    117123            // create a player
    118124            WorldEntity* myPlayer = new Player();
     
    154160                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
    155161              }
    156            
     162
    157163            // create a player
    158             //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
    159164            WorldEntity* myPlayer = new Player();
    160165            this->spawn(myPlayer);
    161             this->localPlayer = myPlayer;
     166            this->localPlayer = myPlayer;           
    162167           
    163168            // bind input
     
    539544      else
    540545        {
    541           printf("fps = 1000 but 0ms!\n");
     546          printf("fps = 1000 - frame rate is adjusted\n");
     547          SDL_Delay(10);
     548          dt = 10;
    542549        }
    543550     
Note: See TracChangeset for help on using the changeset viewer.