Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 26, 2015, 9:08:11 AM (9 years ago)
Author:
gania
Message:

split up some code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc

    r10859 r10864  
    3535    RegisterClass(WingmanController);
    3636   
    37     //CommonController contains all common functionality of AI Controllers
    38     WingmanController::WingmanController(Context* context) : CommonController(context)
     37    //ActionpointController contains all common functionality of AI Controllers
     38    WingmanController::WingmanController(Context* context) : ActionpointController(context)
    3939    {
    4040        RegisterObject(WingmanController);
     
    8181        if (!this->myLeader_)
    8282        {
    83             CommonController* newLeader = findNewLeader();
     83            ActionpointController* newLeader = findNewLeader();
    8484            this->myLeader_ = newLeader;
    8585           
     
    9292        if (!this->myLeader_)
    9393        {
    94            CommonController::action();
     94           ActionpointController::action();
    9595        }
    9696        else if (this->myLeader_)
     
    217217    }
    218218    //----POST: closest leader that is ready to take a new wingman is returned----
    219     CommonController* WingmanController::findNewLeader()
     219    ActionpointController* WingmanController::findNewLeader()
    220220    {
    221221
     
    224224
    225225        //----vars for finding the closest leader----
    226         CommonController* closestLeader = 0;
     226        ActionpointController* closestLeader = 0;
    227227        float minDistance =  std::numeric_limits<float>::infinity();
    228228        Gametype* gt = this->getGametype();
    229         for (ObjectList<CommonController>::iterator it = ObjectList<CommonController>::begin(); it; ++it)
     229        for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
    230230        {
    231231            //----0ptr or not a leader or dead?----
Note: See TracChangeset for help on using the changeset viewer.