Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 10, 2015, 4:37:34 PM (8 years ago)
Author:
gania
Message:

added choose maneuver type functionality

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc

    r10789 r10793  
    8080            }
    8181        }*/
     82        for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
     83        {
     84            if (this->getControllableEntity()->getTeam() == static_cast<ControllableEntity*>(*itP)->getTeam())
     85                continue;           
     86
     87            for(std::vector<WeakPtr<DivisionController> >::iterator it = divisions_.begin(); it != divisions_.end(); ++it)
     88            {
     89                if (static_cast<ControllableEntity*>(*itP) != (*it)->getControllableEntity() && !(*it)->hasTarget())
     90                {
     91                    (*it)->setTarget(*itP);
     92                }
     93               
     94            }   
     95           
     96        }
    8297
    8398    }
Note: See TracChangeset for help on using the changeset viewer.