Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 7, 2005, 4:24:58 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the story entities now get deleted properly on shutdown

File:
1 edited

Legend:

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

    r4600 r4816  
    5757}
    5858
    59 Campaign::~Campaign () {}
     59Campaign::~Campaign ()
     60{}
    6061
    6162
     
    133134      se->destroy();
    134135
     136      this->entities->remove(se);
    135137      delete se;
    136138
     
    146148          return errorCode;
    147149        }
    148 
    149     }
     150    }
     151
     152    /* clean up all world that have not been loaded and therefore are still in the world list  -
     153       this probably does not belong into the start function. remove this later
     154    */
     155    tIterator<StoryEntity>* it = this->entities->getIterator();
     156    se = it->nextElement();
     157    while( se != NULL)
     158    {
     159      delete se;
     160      se = it->nextElement();
     161    }
     162    delete this->entities;
    150163}
    151164
     
    171184    {
    172185      this->currentEntity->stop();
    173       //delete this->currentEntity;
    174       //this->currentEntity = NULL;
    175186    }
    176187}
     
    228239{
    229240  printf("Campaign:nextLevel()\n");
    230   //int nextID = this->currentEntity->getNextStoryID();
    231   //this->stop();
    232   //this->start(nextID);
    233241  this->currentEntity->stop();
    234242}
Note: See TracChangeset for help on using the changeset viewer.