Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2010, 2:50:59 PM (15 years ago)
Author:
dafrick
Message:

Some changed in a level also in Triggers…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/gametypes/TeamDeathmatch.cc

    r6920 r6935  
    138138
    139139        SpawnPoint* fallbackSpawnPoint = NULL;
    140 
    141140        if (teamSpawnPoints.size() > 0)
    142141        {
    143142            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
    144143            unsigned int index = 0;
     144            // Get random fallback spawnpoint in case there is no active SpawnPoint.
    145145            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
    146146            {
     
    154154            }
    155155
     156            // Remove all inactive SpawnPoints from the list.
    156157            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
    157158            {
    158                 if (!(*it)->isActive())
    159                 {
    160                     COUT(1) << "MUP" << std::endl;
     159                if(!(*it)->isActive())
     160                {
     161                    COUT(1) << (*it)->getName() << " is inactive." << std::endl;
    161162                    teamSpawnPoints.erase(it++);
    162163                    continue;
    163164                }
     165                COUT(1) << (*it)->getName() << " is active." << std::endl;
    164166
    165167                ++it;
    166168            }
     169
     170            COUT(1) << "MUP " << teamSpawnPoints.size() << std::endl;
    167171
    168172            randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
Note: See TracChangeset for help on using the changeset viewer.