Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 3, 2015, 5:06:05 PM (8 years ago)
Author:
gania
Message:

fixed a bug

File:
1 edited

Legend:

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

    r10759 r10763  
    5858        this->divisions_.clear();
    5959       
    60         /*for (ObjectList<DivisionController>::iterator it = ObjectList<DivisionController>::begin(); it; ++it)
     60        for (ObjectList<DivisionController>::iterator it = ObjectList<DivisionController>::begin(); it; ++it)
    6161        {
    6262            if ((this->getControllableEntity()->getTeam() == (it)->getControllableEntity()->getTeam()))
     
    6565            }
    6666        }
     67        /*for(std::vector<WeakPtr<DivisionController> >::iterator it2 = divisions_.begin(); it2 != divisions_.end(); ++it2)
     68        {
     69            (*it2)->setTargetPosition(this->getControllableEntity()->getWorldPosition());   
     70        }*/
    6771        for (ObjectList<Controller>::iterator it = ObjectList<Controller>::begin(); it; ++it)
    6872        {
    69             if ((this->getControllableEntity()->getTeam() != (it)->getControllableEntity()->getTeam()) && (it)->getControllableEntity()->getTeam() != 0)
     73            if ((this->getControllableEntity()->getTeam() != (it)->getControllableEntity()->getTeam()) && (it)->getControllableEntity()->getTeam() == 0)
    7074            {
    7175                for(std::vector<WeakPtr<DivisionController> >::iterator it2 = divisions_.begin(); it2 != divisions_.end(); ++it2) {
    7276                    (*it2)->setTarget(it->getControllableEntity());   
     77                    (*it2)->setTargetPosition(it->getControllableEntity()->getWorldPosition());
    7378                }               
    7479                break;
    7580            }
    76         }*/
     81        }
    7782
    7883    }
Note: See TracChangeset for help on using the changeset viewer.