Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 10, 2016, 12:29:37 PM (9 years ago)
Author:
binderm
Message:

some minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/bindermFS16/src/orxonox/LevelManager.cc

    r11180 r11181  
    5353    {
    5454        this->won = false;
    55         this->nextLevels.insert(this->nextLevels.begin(),-1);
     55        this->nextLevels.insert(this->nextLevels.begin(),1);
    5656    }
    5757
     
    6363    int LevelManager::missionactivate(int index)
    6464    {
    65             return index+1;
    66 
    6765
    6866        if (allLevelStatus_[index].won)
     
    7068
    7169        //check if level is activated
    72         for(unsigned int i=1;i<allLevelStatus_.size();i++)
     70        for(unsigned int i=0;i<allLevelStatus_.size();i++)
    7371        {
    7472            std::vector<int> nextLevels=allLevelStatus_[i].nextLevels;
     
    7977
    8078        //check if level visible but not activated
    81         for(unsigned int i=1;i<allLevelStatus_.size();i++)
     79        for(unsigned int i=0;i<allLevelStatus_.size();i++)
    8280        {
    8381            std::vector<int> nextLevels=allLevelStatus_[i].nextLevels;
     
    8684                return 2;
    8785        };
    88         return false;
     86        return 0;
    8987    }
    9088
     
    102100        LevelStatus level;
    103101        allLevelStatus_.assign (10,level);
    104         allLevelStatus_[1].won=true;
     102        allLevelStatus_[0].won=true;
     103
     104       
     105        allLevelStatus_[1].nextLevels.push_back(2);
     106        allLevelStatus_[1].nextLevels.push_back(2);
     107        allLevelStatus_[1].nextLevels.push_back(1);
     108        allLevelStatus_[1].nextLevels.push_back(2);
     109
    105110
    106111    }
Note: See TracChangeset for help on using the changeset viewer.