39 Vector2D center(areaDimension / 2, areaDimension / 2);
44 if(CollisionRect != NULL) {
56 bool obstacleHit =
false;
76 else if(cosAngle < -0.71) {
87 CollisionList::iterator i;
122 Vector2D separation, alignment, cohesion, toTarget;
123 int NeighborCount = 0;
133 if(NeighborCount > 0) {
134 cohesion /= (double)NeighborCount;
143 direction = separation * 0.4 + alignment * 0.1 + cohesion * 0.35 + toTarget * 0.25;
151 double sceneryX, sceneryY;
155 for(
int i = 0; i < dimension; i += 10) {
156 for(
int j = 0; j < dimension; j+= 10) {
157 sceneryType = rand() % 3;
158 switch(sceneryType) {
165 sceneryX = 1 + (rand() % 8);
166 sceneryY = 1 + (rand() % 8);
170 sceneryX = 1 + (rand() % 6);
171 sceneryY = 1 + (rand() % 5);