/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Thomas Fahrni co-programmer: */ #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI #include "ai_swarm.h" void AISwarm::process(float dt) { Vector swarmCenter; for(unsigned int i=0;igetPosition(); } swarmCenter=swarmCenter/swarmMembers.size(); for(unsigned int i=0;iprocess(dt); } void AISwarm::addToSwarm(AIModule* newMember) { swarmMembers.push_back(newMember); } void AISwarm::removeFromSwarm(AIModule* member) { std::vector::iterator it = this->swarmMembers.begin(); for(; it < this->swarmMembers.end(); it++) { // for(unsigned int i=0;i