Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10244 in orxonox.OLD for branches/ai/src/ai/ai_engine.cc


Ignore:
Timestamp:
Jan 17, 2007, 12:43:30 AM (17 years ago)
Author:
tfahrni
Message:

tired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ai/src/ai/ai_engine.cc

    r10226 r10244  
    3030        for (it=teams.begin(); it!= teams.end(); it++ )
    3131        {
    32                 //find enemys for the team
    33                 for(ObjectList<NPC2>::const_iterator npc = NPC2::objectList().begin(); npc != NPC2::objectList().end(); ++npc)
    34                         if((*npc)->getTeam() != it->first)enemyList->push_back(*npc);
    35 
    3632                //add player to enemys (player belongs to team 0)
    3733                if(it->first!=0){
    38                         //std::cout << "adding player to enemyList\n";
    3934                        Player* pl = State::getPlayer();
    4035                        if(pl != NULL)enemyList->push_back(pl->getPlayable());
    4136                }
     37       
     38                //find other enemys for this team
     39                for(ObjectList<NPC2>::const_iterator npc = NPC2::objectList().begin(); npc != NPC2::objectList().end(); ++npc)
     40                        if((*npc)->getTeam() != it->first)enemyList->push_back(*npc);
    4241
    4342                //process the team
Note: See TracChangeset for help on using the changeset viewer.