Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5115 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Aug 24, 2005, 1:30:13 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reimplemented the list functions, as i did before in revision 5110.
This time, i looked out for the bugs, and i think i found one

@patrick: i know, that you do not want to code at the moment… :/ → see mail

Location:
trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/campaign.cc

    r5111 r5115  
    154154    */
    155155    tIterator<StoryEntity>* it = this->entities->getIterator();
    156     se = it->nextElement();
     156    se = it->firstElement();
    157157    while( se != NULL)
    158158    {
     
    284284
    285285  tIterator<StoryEntity>* iterator = this->entities->getIterator();
    286   StoryEntity* entity = iterator->nextElement();
     286  StoryEntity* entity = iterator->firstElement();
    287287  while( entity != NULL)
    288288    {
  • trunk/src/story_entities/world.cc

    r5111 r5115  
    118118  PRINTF(3)("World::~World() - deleting current world\n");
    119119
    120   ParticleEngine::getInstance()->debug();
    121 
    122120  // here everything that is alocated by the World is deleted
    123121  delete this->entities;
    124122  State::setWorldEntityList(NULL);
     123
    125124
    126125  delete LightManager::getInstance();
     
    135134  FastFactory::flushAll(true);
    136135
     136
    137137  // erease everything that is left.
    138138  delete NullParent::getInstance();
     
    140140
    141141  // unload the resources !!
    142   ResourceManager::getInstance()->unload(this->music);
     142//  ResourceManager::getInstance()->unload(this->music);
    143143  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
    144144}
     
    761761void World::debug()
    762762{
     763  PRINTF(0)("Printing out the List of alive WorldEntities:\n");
     764  tIterator<WorldEntity>* iterator = this->entities->getIterator();
     765  WorldEntity* entity = iterator->firstElement();
     766  while( entity != NULL)
     767  {
     768    PRINTF(0)("%s::%s\n", entity->getClassName(), entity->getName());
     769    entity = iterator->nextElement();
     770  }
     771  delete iterator;
    763772}
    764773
     
    864873
    865874      tIterator<WorldEntity>* iterator = this->entities->getIterator();
    866       WorldEntity* entity = iterator->nextElement();
     875      WorldEntity* entity = iterator->firstElement();
    867876      while( entity != NULL)
    868877        {
     
    951960  glLoadIdentity();
    952961  tIterator<WorldEntity>* iterator = this->entities->getIterator();
    953   entity = iterator->nextElement();
     962  entity = iterator->firstElement();
    954963  while( entity != NULL )
    955964  {
Note: See TracChangeset for help on using the changeset viewer.