Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 9, 2009, 5:15:14 PM (15 years ago)
Author:
landauf
Message:

list of remaining objects after a level unloading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gamestates/GSLevel.cc

    r5910 r5922  
    150150    void GSLevel::loadLevel()
    151151    {
     152        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
     153            this->staticObjects_.insert(*it);
     154       
    152155        // call the loader
    153156        COUT(0) << "Loading level..." << std::endl;
     
    160163        Loader::unload(startFile_);
    161164        delete startFile_;
     165
     166        COUT(3) << "Unloaded level. Remaining objects:" << std::endl;
     167        unsigned int i = 0;
     168        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
     169        {
     170            std::set<BaseObject*>::const_iterator find = this->staticObjects_.find(*it);
     171            if (find == this->staticObjects_.end())
     172            {
     173                COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ")" << std::endl;
     174            }
     175        }
     176        COUT(3) << i << " objects remaining.";
     177        if (i == 0)
     178            COUT(3) << " Well done!" << std::endl;
     179        else
     180            COUT(3) << " Try harder!" << std::endl;
    162181    }
    163182}
Note: See TracChangeset for help on using the changeset viewer.