Changeset 10244 in orxonox.OLD for branches/ai/src/ai/ai_engine.cc
- Timestamp:
- Jan 17, 2007, 12:43:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ai/src/ai/ai_engine.cc
r10226 r10244 30 30 for (it=teams.begin(); it!= teams.end(); it++ ) 31 31 { 32 //find enemys for the team33 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 36 32 //add player to enemys (player belongs to team 0) 37 33 if(it->first!=0){ 38 //std::cout << "adding player to enemyList\n";39 34 Player* pl = State::getPlayer(); 40 35 if(pl != NULL)enemyList->push_back(pl->getPlayable()); 41 36 } 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); 42 41 43 42 //process the team
Note: See TracChangeset
for help on using the changeset viewer.