void Commander::unitCreated(BaseAgent* agent) { //Sort the squad list sortSquadList(); for (int i = 0; i < (int)squads.size(); i++) { if (squads.at(i)->addMember(agent)) { break; } } }
void Commander::unitCreated(BaseAgent* agent) { //Sort the squad list sortSquadList(); for (Squad* s : squads) { if (s->addMember(agent)) { break; } } }