Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8039


Ignore:
Timestamp:
Mar 7, 2011, 12:08:27 AM (14 years ago)
Author:
dafrick
Message:

Adding warning for levels with same names.

Location:
code/branches/usability
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/data/levels/presentationFS102.oxw

    r7679 r8039  
    11<LevelInfo
    2  name = "Presentation XI FPS"
     2 name = "Presentation XI FPS 1st"
    33 description = "2nd Presentation level for Orxonox Convention XI, FPS"
    44 tags = "presentation"
  • code/branches/usability/data/levels/presentationFS10Ed.oxw

    r7679 r8039  
    11<LevelInfo
    2  name = "Presentation XI FPS"
     2 name = "Presentation XI FPS 2nd"
    33 description = "3rd Presentation level for Orxonox Convention XI, FPS"
    44 tags = "presentation"
  • code/branches/usability/src/orxonox/LevelManager.cc

    r7999 r8039  
    251251        // Iterate over all the found *.oxw files
    252252        COUT(3) << "Loading LevelInfos..." << std::endl;
     253        std::set<std::string> names;
    253254        for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it)
    254255        {
     
    277278                }
    278279
     280                // Warn about levels with the same name.
     281                if(!names.insert(info->getName()).second)
     282                    COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with name '" << info->getName() << "' found!" << std::endl;
     283
    279284                // Warn about multiple items so that it gets fixed quickly
    280285                if(availableLevels_.find(info) != availableLevels_.end())
    281286                {
    282                     COUT(2) << "Warning: Multiple levels with name '" << info->getName() << "' found!" << std::endl;
     287                    COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with same name '" << info->getName() << "' and filename found! Exluding..." << std::endl;
    283288                    // Delete LevelInfoItem to avoid a dangling pointer
    284289                    delete info;
Note: See TracChangeset for help on using the changeset viewer.